开发者

How to resize parent window size from iframe?

I have a XUL file with iframe:

<window>
    <iframe src="chrome://plugin/content/options.html" 
    style="width: 290px; height: 320px; padding: 0px; margin: 0px"/>
    <script>
        window.f开发者_StackOverflow社区rames[0].parent = window;
    </script>
</window>

How can i resize parent window size from options.html?


Within regular frames you can use "top" to get the topmost window. I don't know about an iframe, but you could try:

top.resizeTo(width, height);
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜