chore: update to standard 12
This commit is contained in:
parent
9e85bdb02c
commit
558fff69e7
198 changed files with 4455 additions and 2940 deletions
|
@ -1,4 +1,4 @@
|
|||
const {ipcRenderer} = require('electron')
|
||||
const { ipcRenderer } = require('electron')
|
||||
const Event = require('./extensions/event')
|
||||
const url = require('url')
|
||||
|
||||
|
@ -99,14 +99,14 @@ exports.injectTo = function (extensionId, isBackgroundPage, context) {
|
|||
|
||||
// Parse the optional args.
|
||||
let targetExtensionId = extensionId
|
||||
let connectInfo = {name: ''}
|
||||
let connectInfo = { name: '' }
|
||||
if (args.length === 1) {
|
||||
connectInfo = args[0]
|
||||
} else if (args.length === 2) {
|
||||
[targetExtensionId, connectInfo] = args
|
||||
}
|
||||
|
||||
const {tabId, portId} = ipcRenderer.sendSync('CHROME_RUNTIME_CONNECT', targetExtensionId, connectInfo)
|
||||
const { tabId, portId } = ipcRenderer.sendSync('CHROME_RUNTIME_CONNECT', targetExtensionId, connectInfo)
|
||||
return new Port(tabId, portId, extensionId, connectInfo.name)
|
||||
},
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue