Chrome: How to get windows of a frame element?
I'm wondering how do I get the window of a frame element? The function for what I'm looking for in Firefox would be...
function getBrowserForDocument(doc){
doc = doc ? doc : window.content.document;
v开发者_如何学JAVAar b = gBrowser.getBrowserForDocument(doc);
if(!b)
{
b = gBrowser.getBrowserForDocument(window.content.document);
}
return b;
}
What's the Chrome equivalent?
If you have a Frame, you can get its "Document" by doing iframe.contentDocument
. As far as I know, you cannot get its window element.
精彩评论