开发者

Chrome: How to get windows of a frame element?

开发者 https://www.devze.com 2023-02-07 05:30 出处:网络
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...

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

精彩评论

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