From 6ebffd2882576aa23cda26b9dd193217ffcf51d5 Mon Sep 17 00:00:00 2001 From: Pontus Lundin Date: Wed, 18 Dec 2019 12:37:34 +0000 Subject: [PATCH] pseudo code --- src/runtime/internal/dom.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/runtime/internal/dom.ts b/src/runtime/internal/dom.ts index c641315bc37b..5b3c70261d98 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 +}