|
@@ -34,7 +34,7 @@ class Port {
|
|
|
})
|
|
|
ipcRenderer.on(`CHROME_PORT_POSTMESSAGE_${portId}`, (event, message) => {
|
|
|
const sendResponse = function () { console.error('sendResponse is not implemented') }
|
|
|
- this.onMessage.emit(message, this.sender, sendResponse)
|
|
|
+ this.onMessage.emit(JSON.parse(message), this.sender, sendResponse)
|
|
|
})
|
|
|
}
|
|
|
|
|
@@ -46,7 +46,7 @@ class Port {
|
|
|
}
|
|
|
|
|
|
postMessage (message) {
|
|
|
- ipcRenderer.sendToAll(this.tabId, `CHROME_PORT_POSTMESSAGE_${this.portId}`, message)
|
|
|
+ ipcRenderer.sendToAll(this.tabId, `CHROME_PORT_POSTMESSAGE_${this.portId}`, JSON.stringify(message))
|
|
|
}
|
|
|
|
|
|
_onDisconnect () {
|