🍄self
🚧 施工中
JS ⟩ browser ⟩ worker ⟩ global object
(a WorkerGlobalScope object) the global object in web worker environment.
in a web worker, the global object reference is made using self:
var name = "Joe"; // global var => global object prop
let id = 42; // global let
self.name; // "Joe"
self.id; // undefinedcompare global objects in other environments.
Last updated
Was this helpful?