Chrome app navigate htmls without creating windows

…衆ロ難τιáo~ 提交于 2019-12-02 04:27:06

Packaged apps intentionally do not support navigation. Apps are not in a browser, there is no concept of forward, back, or reload. Applications which do require the concept of navigation, or modal dialogs, should use a user interface framework that supports that functionality. In fundamentals, you can navigate by manipulating the DOM or by using CSS to animate and control visibility of components of your app.

The page you want to navigate to can be opened in a new window, then the previous page can be closed.

function navigateToLink (link) {
  var current = chrome.app.window.current();

  chrome.app.window.create(link);

  current.close();
}
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!