(tabId, allFrames, codeConfig, callback)
| 3 | export default (() => { |
| 4 | |
| 5 | let _execFunc = (tabId, allFrames, codeConfig, callback) => { |
| 6 | let opts = { |
| 7 | target: {tabId, allFrames}, |
| 8 | func: codeConfig.func, |
| 9 | args: codeConfig.args || [] |
| 10 | }; |
| 11 | if (codeConfig.world) opts.world = codeConfig.world; |
| 12 | chrome.scripting.executeScript(opts, function () { |
| 13 | if (chrome.runtime.lastError) { |
| 14 | console.warn('InjectTools._execFunc failed:', chrome.runtime.lastError); |
| 15 | } |
| 16 | callback && callback.apply(this, arguments); |
| 17 | }); |
| 18 | }; |
| 19 | |
| 20 | let _execJs = (tabId, allFrames, js, callback, world) => { |
| 21 | let opts = { |
no outgoing calls
no test coverage detected