javascript - Why my protocol handler registered cannot trigger chrome app's url_handlers directly? -
to launch chrome app, set url_handlers in manifest.json below:
"url_handlers": { "view": { "matches": [ "http://test.view.com/start.html*" ], "title": "view" } }
so when open link "http://test.view.com/start.html*", chrome app can started successfully. register protocol handler create own url schema below:
var url = "http://test.songli.com/start.html?data=%s"; window.navigator.registerprotocolhandler("web+view", url, "test");
here comes question. when open link "web+view:data", browser can open "http://test.view.com/start.html?data=blahblah". however, chrome app cannot started time. after refreshing page, app can opened. in fact, want open chrome app directly open link "web+view:data". there wrong in way?
Comments
Post a Comment