electron/spec/fixtures/workers/shared_worker.js

8 lines
158 B
JavaScript
Raw Normal View History

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