electron/spec/fixtures/workers/shared_worker.js

8 lines
163 B
JavaScript
Raw Normal View History

2016-03-25 20:03:49 +00:00
this.onconnect = function (event) {
2020-03-20 20:28:31 +00:00
const port = event.ports[0];
port.start();
2016-03-25 20:03:49 +00:00
port.onmessage = function (event) {
2020-03-20 20:28:31 +00:00
port.postMessage(event.data);
};
};