Dewett N.
Dewett N.

Reputation: 13

Open a website in crosswalk webview

I'm building app with newest versions of cordova and crosswalk. When i launch the app, i want to open mywebsite in crosswalk webview instead of default browser or chrome. I'm trying to use:

  1. window.location.href="http://www.webpage.com"
  2. window.open('http://webpage.com', '_self');

But they did not work. If i use them, the app asks me where i want to open my site in chrome or in default browser. I tried to use:

  1. navigator.app.loadUrl("http://google.com", {openExternal : true});

But i've got a white screen in app. I don't want to use InAppBrowser, cuz it opens website in default webview, i wanna open website exactly in Crosswalk webview. Can someone help me to open website in crosswalk webview?

Upvotes: 1

Views: 2142

Answers (1)

beaver
beaver

Reputation: 17647

Have you checked this post?

https://issues.apache.org/jira/browse/CB-9573

They suggest to use:

//config.xml
<allow-navigation href="http://cordova.apache.org/*" />

//code
window.open('http://cordova.apache.org/', '_self');

Upvotes: 1

Related Questions