diff options
author | Luca Casonato <lucacasonato@yahoo.com> | 2021-02-13 15:58:12 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-02-13 15:58:12 +0100 |
commit | af460fc464562566dc1534c0f61f53c2976b9bd7 (patch) | |
tree | 74ac43e5574711f71d5ee90bbc020740e41bdf69 /op_crates/web/03_global_interfaces.js | |
parent | d2d7dc8d675d70f0061bdaf99ae4a08d84156aa9 (diff) |
fix: webidl utils and align `Event` to spec (#9470)
Diffstat (limited to 'op_crates/web/03_global_interfaces.js')
-rw-r--r-- | op_crates/web/03_global_interfaces.js | 70 |
1 files changed, 0 insertions, 70 deletions
diff --git a/op_crates/web/03_global_interfaces.js b/op_crates/web/03_global_interfaces.js deleted file mode 100644 index 74697a42e..000000000 --- a/op_crates/web/03_global_interfaces.js +++ /dev/null @@ -1,70 +0,0 @@ -"use strict"; -((window) => { - const { EventTarget } = window; - - const illegalConstructorKey = Symbol("illegalConstructorKey"); - - class Window extends EventTarget { - constructor(key = null) { - if (key !== illegalConstructorKey) { - throw new TypeError("Illegal constructor."); - } - super(); - } - - get [Symbol.toStringTag]() { - return "Window"; - } - } - - class WorkerGlobalScope extends EventTarget { - constructor(key = null) { - if (key != illegalConstructorKey) { - throw new TypeError("Illegal constructor."); - } - super(); - } - - get [Symbol.toStringTag]() { - return "WorkerGlobalScope"; - } - } - - class DedicatedWorkerGlobalScope extends WorkerGlobalScope { - constructor(key = null) { - if (key != illegalConstructorKey) { - throw new TypeError("Illegal constructor."); - } - super(); - } - - get [Symbol.toStringTag]() { - return "DedicatedWorkerGlobalScope"; - } - } - - window.__bootstrap = (window.__bootstrap || {}); - window.__bootstrap.globalInterfaces = { - DedicatedWorkerGlobalScope, - Window, - WorkerGlobalScope, - dedicatedWorkerGlobalScopeConstructorDescriptor: { - configurable: true, - enumerable: false, - value: DedicatedWorkerGlobalScope, - writable: true, - }, - windowConstructorDescriptor: { - configurable: true, - enumerable: false, - value: Window, - writable: true, - }, - workerGlobalScopeConstructorDescriptor: { - configurable: true, - enumerable: false, - value: WorkerGlobalScope, - writable: true, - }, - }; -})(this); |