diff options
author | Benjamin Gruenbaum <benjamingr@gmail.com> | 2020-11-14 14:10:23 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-11-14 13:10:23 +0100 |
commit | 3d65e57d7c48f5dd1307f83771fe5574d914cea3 (patch) | |
tree | 80396bd252f01c9794a226785582c0408c78549f /op_crates/web/03_global_interfaces.js | |
parent | 3a0ebff641c5b5d8d3c87b67c3e6f5b4f004478f (diff) |
fix: fix various global objects constructor length (#8373)
This commit changes various Web APIs constructors to
match their signature in the browser.
Diffstat (limited to 'op_crates/web/03_global_interfaces.js')
-rw-r--r-- | op_crates/web/03_global_interfaces.js | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/op_crates/web/03_global_interfaces.js b/op_crates/web/03_global_interfaces.js index 3c6b5695b..7ade64cc1 100644 --- a/op_crates/web/03_global_interfaces.js +++ b/op_crates/web/03_global_interfaces.js @@ -4,7 +4,7 @@ const illegalConstructorKey = Symbol("illegalConstuctorKey"); class Window extends EventTarget { - constructor(key) { + constructor(key = null) { if (key !== illegalConstructorKey) { throw new TypeError("Illegal constructor."); } @@ -17,7 +17,7 @@ } class WorkerGlobalScope extends EventTarget { - constructor(key) { + constructor(key = null) { if (key != illegalConstructorKey) { throw new TypeError("Illegal constructor."); } @@ -30,7 +30,7 @@ } class DedicatedWorkerGlobalScope extends WorkerGlobalScope { - constructor(key) { + constructor(key = null) { if (key != illegalConstructorKey) { throw new TypeError("Illegal constructor."); } |