fix: use sendToAll method correctly in chrome-api (#15518)

This commit is contained in:
Samuel Attard 2018-11-02 01:16:49 +11:00 committed by Shelley Vohr
parent bdef033459
commit fe8965efa2

View file

@ -43,12 +43,12 @@ class Port {
disconnect () {
if (this.disconnected) return
ipcRenderer._sendInternalToAll(this.tabId, `CHROME_PORT_DISCONNECT_${this.portId}`)
ipcRenderer.sendToAll(this.tabId, `CHROME_PORT_DISCONNECT_${this.portId}`)
this._onDisconnect()
}
postMessage (message) {
ipcRenderer._sendInternalToAll(this.tabId, `CHROME_PORT_POSTMESSAGE_${this.portId}`, message)
ipcRenderer.sendToAll(this.tabId, `CHROME_PORT_POSTMESSAGE_${this.portId}`, message)
}
_onDisconnect () {