cordova-plugin-inappbrowserxwalk
This plugin provides a web browser view, which is using the Crosswalk engine to render pages.
Requirements
This plugin requires Cordova build with Crosswalk.
Installation
$ cordova plugin add https://github.com/Shoety/cordova-plugin-inappbrowserxwalk
Or if you are using cordova cli version 5.0.0 or higher then you can fetch it from npm : https://www.npmjs.com/package/com.shoety.cordova.plugin.inappbrowserxwalk
Methods
open
var browser = windowinAppBrowserXwalk;
Opens a new Crosswalk Webview in a dialog. The options parameter is optional, possible parameters are demonstrated under Examples. If you dont pass options, the browser will open with default options.
close
browser
Closes the browser and destroys dialog and webview.
hide
browser
Hides the browser but does not destroy it. You can call the show() function to make the browser visible again.
show
browser
Will make a hidden browser visible. Use this after browser.hide() or if the browser was opened with the openHidden : true option.
addEventListener
browser
Adds a listener for an event from the crosswalk browser. Possible events: loadstart, loadstop, exit
removeEventListener
browser
Removes the eventlistener for an event.
Examples
var options = toolbarColor: '#FFFFFF' // Background color of the toolbar in #RRGGBB toolbarHeight: '40' closeButtonText: '< Close' closeButtonSize: '25' closeButtonColor: '#000000' openHidden: false ; if windowcordova && cordovaplatformId === "android" var browser = windowinAppBrowserXwalk; browser; browser; browser; else window;
Options is an optional Parameter, leaving it out, opens the browser with standard settings.