5
  • Using a chrome extension relying on executeScript with function

  • BugsMobileDone

The executeScript API doesn't seem to behave as expected when using function instead of script file.
chrome.tabs.executeScript({
target : {
tabId: currTab.id,
},
func: function (variable) {
code
return (value);
},
args: [variable_sent]
}).then((injectionResults) => {
injectionResults.result;

The .then clause seems to be ignored.

I'd expect the .then to be executed.

Orion mobile iPhone latest version

17

  • dino replied to this.

    Thanks for the tag
    Any high level clue when this could be fixed? days ? weeks? months?
    Not asking for a precise view, just to get some hint.
    This is currently a showstopper for me asking to iPhone users to setup Orion to use extension.

    • Vlad replied to this.
      25 days later

      Pozitiv There's no func and args options available in chrome.tabs.executeScript

      https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/API/tabs/executeScript
      https://developer.chrome.com/docs/extensions/reference/api/tabs#method-executeScript

      func and args are only available in chrome.scripting.executeScript so you must be using wrong API as example. However we are able to reproduce this with chrome.scripting.executeScript so fixing this for now

      2 months later
      No one is typing