How about instead you do:
function addScriptToTab(tab){
chrome.tabs.executeScript(tab.id, {file: 'executeScript.js'});
}
Does that work?
On Fri, Dec 18, 2009 at 07:15, Tase <[email protected]> wrote:
> I am getting this error:
>
> Error during tabs.executeScript: Failed to load file: "chrome-
> extension://jkeocebkphgimhjogmhfnbdhjbcjclng/executeScript.js".
>
> background page:
>
> function addScriptToTab(tab){
> chrome.tabs.executeScript(tab.id,{file:chrome.extension.getURL
> ('executeScript.js')},function(){});
> }
>
> chrome.tabs.onUpdated.addListener(function(tabId,changeInfo,tab){
> addScriptToTab(tab);
> }
>
> executeScript.js:
> console.log('script loaded');
>
> if I instead use
> chrome.tabs.executeScript(tab.id,{code:'console.log("script
> loaded");'},function(){});
> it works
>
>
> can anyone help???
>
> chrome 4.0.266.0 both lin & win
>
> --
>
> You received this message because you are subscribed to the Google Groups
> "Chromium-extensions" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected]<chromium-extensions%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/chromium-extensions?hl=en.
>
>
>
--
You received this message because you are subscribed to the Google Groups
"Chromium-extensions" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/chromium-extensions?hl=en.