2021-02-04 17:18:32 -05:00
|
|
|
"use strict";
|
2020-10-20 00:05:42 -04:00
|
|
|
((window) => {
|
|
|
|
const { EventTarget } = window;
|
|
|
|
|
2020-12-10 14:45:45 -05:00
|
|
|
const illegalConstructorKey = Symbol("illegalConstructorKey");
|
2020-10-20 00:05:42 -04:00
|
|
|
|
|
|
|
class Window extends EventTarget {
|
2020-11-14 07:10:23 -05:00
|
|
|
constructor(key = null) {
|
2020-10-20 00:05:42 -04:00
|
|
|
if (key !== illegalConstructorKey) {
|
|
|
|
throw new TypeError("Illegal constructor.");
|
|
|
|
}
|
2020-11-03 10:19:29 -05:00
|
|
|
super();
|
2020-10-20 00:05:42 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
get [Symbol.toStringTag]() {
|
|
|
|
return "Window";
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
class WorkerGlobalScope extends EventTarget {
|
2020-11-14 07:10:23 -05:00
|
|
|
constructor(key = null) {
|
2020-10-20 00:05:42 -04:00
|
|
|
if (key != illegalConstructorKey) {
|
|
|
|
throw new TypeError("Illegal constructor.");
|
|
|
|
}
|
2020-11-03 10:19:29 -05:00
|
|
|
super();
|
2020-10-20 00:05:42 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
get [Symbol.toStringTag]() {
|
|
|
|
return "WorkerGlobalScope";
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
class DedicatedWorkerGlobalScope extends WorkerGlobalScope {
|
2020-11-14 07:10:23 -05:00
|
|
|
constructor(key = null) {
|
2020-10-20 00:05:42 -04:00
|
|
|
if (key != illegalConstructorKey) {
|
|
|
|
throw new TypeError("Illegal constructor.");
|
|
|
|
}
|
2020-11-03 10:19:29 -05:00
|
|
|
super();
|
2020-10-20 00:05:42 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
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);
|