CDN Init and Destroy
Load a pinned CDN build once, initialize a widget, then destroy before re-init.
Phase 8 loads libraries from jsDelivr with pinned versions. Script tags for the library come before your lesson script. Always destroy an existing instance before creating another on the same element.
Important JavaScript
if (choicesInstance) {
choicesInstance.destroy();
choicesInstance = null;
}
choicesInstance = new Choices(select, { shouldSort: false });