I want to inject a script file into a panel window in chrome extension.
chrome.windows.create({
width:500,
height:500,
type:"panel",
url:'http://url/',
},function(win){
var a=win.tabs[0];
chrome.tabs.executeScript(a.id,{file:"test.js"},function(){
console.log("hello");
})
})
This produces the error :
tabs.executeScript: No tab with id: 186
But if I change type of window to popup , everything works fine , the code in test.js is executed in context of the url in popup.
Also , chrome.tabs.query() returns all tabs except if a window is of panel type
How can I achieve the same thing with window of type panels?
Is it because panel is not fully tested in chrome or am I doing something wrong.