MCPcopy Create free account
hub / github.com/zxlie/FeHelper / _execFunc

Function _execFunc

apps/background/inject-tools.js:5–18  ·  view source on GitHub ↗
(tabId, allFrames, codeConfig, callback)

Source from the content-addressed store, hash-verified

3export 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 = {

Callers 1

injectScriptIfTabExistsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected