Open mmomtchev opened 1 year ago
The specification says that the constructor should be available in the global scope.
In particular, this is a valid way to check if one is running in a web worker:
if(!(globalThis.WorkerGlobalScope instanceof Function)){
https://html.spec.whatwg.org/multipage/workers.html#the-global-scope
The specification says that the constructor should be available in the global scope.
In particular, this is a valid way to check if one is running in a web worker:
https://html.spec.whatwg.org/multipage/workers.html#the-global-scope