Skip to content

Commit 0245239

Browse files
committed
cleanup
1 parent 7d9ff14 commit 0245239

File tree

2 files changed

+2
-7
lines changed

2 files changed

+2
-7
lines changed

src/runtime/internal/dom.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -273,9 +273,6 @@ export function toggle_class(element, name, toggle) {
273273
}
274274

275275
export function custom_event<T=any>(type: string, detail?: T) {
276-
// is compile target customElement?
277-
// is event not a Svelte event?
278-
// use new CustomEvent with bubbles/composed = true for non, svelte event
279276
const e: CustomEvent<T> = document.createEvent('CustomEvent');
280277
e.initCustomEvent(type, false, false, detail);
281278
return e;
@@ -319,4 +316,4 @@ export class HtmlTag {
319316
d() {
320317
this.n.forEach(detach);
321318
}
322-
}
319+
}

src/runtime/internal/lifecycle.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,6 @@ export function onDestroy(fn) {
2828
}
2929

3030
export function createEventDispatcher() {
31-
// is compile target customElement?
32-
// always dispatch!
3331
const component = get_current_component();
3432

3533
return (type: string, detail?: any) => {
@@ -63,4 +61,4 @@ export function bubble(component, event) {
6361
if (callbacks) {
6462
callbacks.slice().forEach(fn => fn(event));
6563
}
66-
}
64+
}

0 commit comments

Comments
 (0)