Stefano Nardo
Stefano Nardo

Reputation: 1647

Include JQuery in an injected script

I'm developing a Chrome app composed of:

I need to use JQuery in the injected script. Where do I have to include JQuery? I included it in window.html and it works using the console but it doesn't work for the webview's script.

Upvotes: 0

Views: 192

Answers (1)

Ed Carter
Ed Carter

Reputation: 17

This might achieve what you want, although I've not tested it with webview I used it with chrome.tabs.executeScript.

webview.executeScript(null, { file: "jquery.js" }, function() {
    webview.executeScript(null, { file: "content.js" });
});

Upvotes: 1

Related Questions