diff options
Diffstat (limited to 'testing/web-platform/tests/workers/interfaces/SharedWorkerGlobalScope/onconnect.js')
-rw-r--r-- | testing/web-platform/tests/workers/interfaces/SharedWorkerGlobalScope/onconnect.js | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/testing/web-platform/tests/workers/interfaces/SharedWorkerGlobalScope/onconnect.js b/testing/web-platform/tests/workers/interfaces/SharedWorkerGlobalScope/onconnect.js new file mode 100644 index 0000000000..34a2be51fc --- /dev/null +++ b/testing/web-platform/tests/workers/interfaces/SharedWorkerGlobalScope/onconnect.js @@ -0,0 +1,19 @@ +var results = []; +try { + self.onconnect = 1; + results.push(String(onconnect)); +} catch(e) { + results.push(''+e); +} +try { + self.onconnect = {handleEvent:function(){}}; + results.push(String(onconnect)); +} catch(e) { + results.push(''+e); +} +var f = function(e) { + results.push(e.data); + e.ports[0].postMessage(results); +}; +onconnect = f; +results.push(typeof onconnect); |