From e55e4a2838e0f67cd0789ec4d3eec62a5b7ab238 Mon Sep 17 00:00:00 2001 From: Nayeem Rahman Date: Tue, 17 Sep 2019 17:17:12 +0100 Subject: Remove some non-standard web API constructors (#2970) This removes the EventListener, EventInit and CustomEventInit constructors from the userland globals. The type exports stay. I removed the internal classes as well. EventListener's implementation seemed to be doing some bookkeeping on handled events but that's not being used anywhere so I assume it's old debug stuff. The other two are completely redundant. --- js/custom_event_test.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'js/custom_event_test.ts') diff --git a/js/custom_event_test.ts b/js/custom_event_test.ts index 8a9dc9416..4d2eb2c16 100644 --- a/js/custom_event_test.ts +++ b/js/custom_event_test.ts @@ -4,12 +4,12 @@ import { test, assertEquals } from "./test_util.ts"; test(function customEventInitializedWithDetail(): void { const type = "touchstart"; const detail = { message: "hello" }; - const customEventDict = new CustomEventInit({ + const customEventInit = { bubbles: true, cancelable: true, detail - }); - const event = new CustomEvent(type, customEventDict); + } as CustomEventInit; + const event = new CustomEvent(type, customEventInit); assertEquals(event.bubbles, true); assertEquals(event.cancelable, true); -- cgit v1.2.3