I insert myscript.js in current page in chrome tab with
chrome.tabs.executeScript(null,
{ file:"myscript.js"}, function() {
chrome.tabs.executeScript(null, { code: "myfunction();"});
window.close();
});
Top frame has one child iframe and value of frame.length is 1.
But when I try to get window of that iframe by using frames[0] or window.frames[0], they are undefined.
Is there my mistakes or just problem of chrome extension?
This is a know bug…..
http://code.google.com/p/chromium/issues/detail?id=20773
…theres a couple of workarounds there in the comments that might help you.