google-chrome - 最小化 Chrome 应用程序窗口

标签 google-chrome google-chrome-app

在 Chrome 打包应用程序中遇到一些 Windows 问题。在文档中,它说 Windows 有函数 close() 和 minimize()

window.close(); //works fine

但是,当我尝试最小化时,我得到了:

window.minimize(); //Uncaught TypeError: Object [object global] has no method 'minimize' 

有什么想法吗?

最佳答案

经过一番摆弄,我明白了:

chrome.app.window.current().minimize();

现在工作正常

关于google-chrome - 最小化 Chrome 应用程序窗口,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20648831/

相关文章:

google-app-engine - App Engine 作为 OAuth2 提供者

google-chrome - 在水平模式下打开 (chrome) devtools

javascript - 仅当我在 Chrome 上缓存刷新时,网站才能完全运行,在其他浏览器上运行良好

ios - Chrome Cordova 翻译问题

google-chrome-extension - 从 Chrome 扩展程序访问 USB 设备或从网页与 Chrome 应用程序通信

javascript - 使用 chrome.notifications.create 时出错 "Uncaught TypeError: Cannot read property ' create' of undefined"

javascript - Firebase+Chrome 应用程序(无扩展程序)

php - "Chrome detected unusual code"之前工作的 iframe 错误

html - Chrome : Div has white line in center

angular - Chrome 8 中的 Identity Server 4 和 SameSite cookie 问题