[英]chrome packaged apps, open new window with button and communicate to the new window
i'm new at chrome packaged apps development and i need support for creating and opening a new window with a button click from the offline packaged app window and communicate between the 2 windows. 我是chrome打包应用程序开发的新手,我需要支持从脱机打包应用程序窗口中单击按钮来创建和打开新窗口,并在两个窗口之间进行通信。 An example would be very nice. 一个例子将是非常好的。
thanks 谢谢
This should do the job: 这应该做的工作:
chrome.app.window.create(url, options, function(window){
//do something with your window
});
url
is the url to the html page, relative to the root of your packaged app directory. url
是html页面的URL,相对于打包的应用程序目录的根目录。 the documentation tells us what to do with the options: http://developer.chrome.com/apps/app_window.html#method-create 该文档告诉我们如何使用这些选项: http : //developer.chrome.com/apps/app_window.html#method-create
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.