how can I execute updateFunc
function in the chrome.scripting.executeScript
?
chrome.scripting.executeScript({
target: { tabId },
func: scrapData,
args: [
variable1,
variable2,
updateFunc, // <- here it's external function
],
});
const scrapExperience = (variable1, variable2, updateFunc) => {
console.log('works?')
const variable3 = updateFunc(variable1, variable2);
if (variable3) {
// do something
}
}
If I try to execute this code -> it simply freezes and nothing proceeds.
console.log also not working.
Here we have an example – but this function returns some value, I need to execute function in the chrome.scripting.executeScript