铬--app相当于在Firefox \\ IE [英] Chrome --app equivalent in Firefox\IE

查看:127
本文介绍了铬--app相当于在Firefox \\ IE的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个客户请求的浏览器窗口大小将不同的按钮点击时更改的Web应用程序。

I have a web application which the customer requested that the browser window size will be changed when clicking on different buttons.

我在<一个发现href=\"http://stackoverflow.com/questions/13436855/launch-google-chrome-from-the-command-line-with-specific-window-coordinates\">link跑跑在的chrome.exe进程 - 应用是非常有用的,因为虽然它不是一个子窗口下面的JavaScript code会甚至工作

I found in that link that running the "chrome.exe" process with "--app" is very useful since the following javascript code will work even though it is not a child window:

window.moveTo(580,240);
window.resizeTo(800,600);  

有没有在Firefox和IE浏览器的任何等同于这个--app模式?结果
谢谢!

Is there any equivalent in Firefox and IE for this "--app" mode ?
Thanks !

推荐答案

我能回答我的问题。但它必须通过子窗口中完成。
起初,我试图做到以下几点:

I was able to answer my own question. however it must be done through child window. At first i tried to do the following:

var win = window.open(url);
win.resizeTo(800, 600);  

这只是工作时,父窗口还活着。当我关闭了父母,没有奏效。结果
但是,下面的函数的工作原理,即使你关闭父窗口:

That worked only when the parent window was alive. when i closed the parent, it did not work.
However the following function works even though you close the parent window:

window.resizeTo(800,600);    

它适用于所有IE,Firefox和Chrome。结果
谢谢!

it works for all IE, Firefox and Chrome.
thanks !

这篇关于铬--app相当于在Firefox \\ IE的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆