7 lines
158 B
JavaScript
7 lines
158 B
JavaScript
this.onconnect = function (event) {
|
|
const port = event.ports[0]
|
|
port.start()
|
|
port.onmessage = function (event) {
|
|
port.postMessage(event.data)
|
|
}
|
|
}
|