summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/fs/resources/message-target-shared-worker.js
blob: 6829c61d4cf9f32f4834ae09ffba1d614b0430a0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
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();
});