fix: use sendToAll method correctly in chrome-api (#15518)
This commit is contained in:
parent
bdef033459
commit
fe8965efa2
1 changed files with 2 additions and 2 deletions
|
@ -43,12 +43,12 @@ class Port {
|
||||||
disconnect () {
|
disconnect () {
|
||||||
if (this.disconnected) return
|
if (this.disconnected) return
|
||||||
|
|
||||||
ipcRenderer._sendInternalToAll(this.tabId, `CHROME_PORT_DISCONNECT_${this.portId}`)
|
ipcRenderer.sendToAll(this.tabId, `CHROME_PORT_DISCONNECT_${this.portId}`)
|
||||||
this._onDisconnect()
|
this._onDisconnect()
|
||||||
}
|
}
|
||||||
|
|
||||||
postMessage (message) {
|
postMessage (message) {
|
||||||
ipcRenderer._sendInternalToAll(this.tabId, `CHROME_PORT_POSTMESSAGE_${this.portId}`, message)
|
ipcRenderer.sendToAll(this.tabId, `CHROME_PORT_POSTMESSAGE_${this.portId}`, message)
|
||||||
}
|
}
|
||||||
|
|
||||||
_onDisconnect () {
|
_onDisconnect () {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue