diff --git a/src/runtime/internal/dom.ts b/src/runtime/internal/dom.ts index 9745e4a508..9ab9a4395f 100644 --- a/src/runtime/internal/dom.ts +++ b/src/runtime/internal/dom.ts @@ -273,9 +273,6 @@ 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; @@ -319,4 +316,4 @@ export class HtmlTag { d() { this.n.forEach(detach); } -} +} \ No newline at end of file diff --git a/src/runtime/internal/lifecycle.ts b/src/runtime/internal/lifecycle.ts index 809a39d717..a8e37e9632 100644 --- a/src/runtime/internal/lifecycle.ts +++ b/src/runtime/internal/lifecycle.ts @@ -28,8 +28,6 @@ export function onDestroy(fn) { } export function createEventDispatcher() { - // is compile target customElement? - // always dispatch! const component = get_current_component(); return (type: string, detail?: any) => { @@ -63,4 +61,4 @@ export function bubble(component, event) { if (callbacks) { callbacks.slice().forEach(fn => fn(event)); } -} +} \ No newline at end of file