diff options
Diffstat (limited to 'testing/web-platform/tests/fs/resources/message-target-shared-worker.js')
-rw-r--r-- | testing/web-platform/tests/fs/resources/message-target-shared-worker.js | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/testing/web-platform/tests/fs/resources/message-target-shared-worker.js b/testing/web-platform/tests/fs/resources/message-target-shared-worker.js new file mode 100644 index 0000000000..6829c61d4c --- /dev/null +++ b/testing/web-platform/tests/fs/resources/message-target-shared-worker.js @@ -0,0 +1,14 @@ +'use strict'; + +importScripts( + 'test-helpers.js', + 'messaging-serialize-helpers.js', + 'message-target.js' +); + +self.addEventListener('connect', connect_event => { + const message_port = connect_event.ports[0]; + add_message_event_handlers( + /*receiver=*/message_port, /*target=*/message_port); + message_port.start(); +});
\ No newline at end of file |