Friday 15 August 2014

How to detect in JavaScript if a page was loaded in a Chrome webview? -


I'm writing a package app for Chrome that contains a webview tag where I load my website < / P>

Is it possible for the JavaScript code to load it into the webview? There is no clue in Navigator.userAgent property.

Other methods other than those outlined by liveings:

  • In the webview Load a slightly different URL, for example, and reflect on the fact that the site is served by Javascript.
  • The same idea, but use #fragment I do not know to ensure that #fragment will work correctly, but if this happens, then it is good because the server is a The strange query will not be confused with the ultimate.
  • Using embeder, insert a script something different in the DOM of the webview.

No comments:

Post a Comment