开发者

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜