diff --git a/src/runtime/internal/dom.ts b/src/runtime/internal/dom.ts index c641315bc3..5b3c70261d 100644 --- a/src/runtime/internal/dom.ts +++ b/src/runtime/internal/dom.ts @@ -268,6 +268,9 @@ export function toggle_class(element, name, toggle) { } export function custom_event(type: string, detail?: T) { + // is compile target customElement? + // is event not a Svelte event? + // use new CustomEvent with bubbles/composed = true for non, svelte event const e: CustomEvent = document.createEvent('CustomEvent'); e.initCustomEvent(type, false, false, detail); return e; @@ -307,4 +310,4 @@ export class HtmlTag { d() { this.n.forEach(detach); } -} \ No newline at end of file +}