Chrome应用 - 如何重新启动应用? [英] Chrome app - how to reboot app?

查看:179
本文介绍了Chrome应用 - 如何重新启动应用?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我如何重新启动/重置应用程序? (background.js /后台页面应重新启动)

解决方案

chrome.runtime API 是您的朋友。


chrome.runtime.reload()



重新加载应用或扩展程序。 / p>

请注意,这可能会关闭应用程序打开的所有窗口。


I am creating a Chrome app and I have made a Logout button in the app.

How can I restart/reset the app? (background.js / background page should be restarted)

解决方案

chrome.runtime API is your friend.

chrome.runtime.reload()

Reloads the app or extension.

Note that this will probably close all windows opened by the app.

这篇关于Chrome应用 - 如何重新启动应用?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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