Source code
Revision control
Copy as Markdown
Other Tools
Test Info:
- This WPT test may be referenced by the following Test IDs:
- /workers/interfaces/WorkerGlobalScope/self.any.serviceworker.html - WPT Dashboard Interop Dashboard
- /workers/interfaces/WorkerGlobalScope/self.any.sharedworker.html - WPT Dashboard Interop Dashboard
- /workers/interfaces/WorkerGlobalScope/self.any.worker.html - WPT Dashboard Interop Dashboard
// META: global=worker
test(function() {
assert_equals(self, self);
}, 'self === self');
test(function() {
assert_true(self instanceof WorkerGlobalScope);
}, 'self instanceof WorkerGlobalScope');
test(function() {
assert_true('self' in self);
}, '\'self\' in self');
test(function() {
var x = self;
self = 1;
assert_equals(self, x);
}, 'self = 1');