Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tabs.executeScript doesn't work with file option #210

Open
tristancaron opened this issue Dec 10, 2014 · 0 comments
Open

tabs.executeScript doesn't work with file option #210

tristancaron opened this issue Dec 10, 2014 · 0 comments

Comments

@tristancaron
Copy link

Hello,

When I want execute the function with file nothing happen...

Doesn't work;

  • main.dart
void main() {
  print("Hello from the file.");
}
  • The function (_onClick call works)
void _onClick(chrome.Tab tab) {
   chrome.InjectDetails inject;

    inject = new chrome.InjectDetails();
    inject.file = "injectedCore/main.dart.js";
    chrome.tabs.executeScript(inject, tab.id);
}
  • The manifest (excerpt)
  "permissions": [
    "tabs"
  ],
  "web_accessible_resources": [
    "driveCore/*"
  ],

It works:

void _onClick(chrome.Tab tab) {
   chrome.InjectDetails inject;

    inject = new chrome.InjectDetails();
    inject.code = 'console.log("Hello from code")';
    chrome.tabs.executeScript(inject, tab.id);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant