diff options
Diffstat (limited to 'toolkit/components/extensions/test/mochitest/file_simple_sharedworker.js')
-rw-r--r-- | toolkit/components/extensions/test/mochitest/file_simple_sharedworker.js | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/toolkit/components/extensions/test/mochitest/file_simple_sharedworker.js b/toolkit/components/extensions/test/mochitest/file_simple_sharedworker.js new file mode 100644 index 0000000000..e8776216f1 --- /dev/null +++ b/toolkit/components/extensions/test/mochitest/file_simple_sharedworker.js @@ -0,0 +1,11 @@ +"use strict"; + +self.onconnect = async evt => { + const port = evt.ports[0]; + port.onmessage = async message => { + await fetch(message.data); + self.close(); + }; + port.start(); + port.postMessage("loaded"); +}; |