👨‍💻 A native webview plugin
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
doc
src
www
README.md
package.json
plugin.xml

README.md

cordova-plugin-native-webview

This plugin will open another native webview to nicely show your web resources inside of your app. At the save time, plugin suport a sharing feature, you can share website to wechat.

Features

  • Share to wechat
  • Nice navigationbar
  • WebView progress bar
  • Suport custom color.
  • Suport gesture(swap right to back).

Example

image

Install

cordova plugin add https://github.com/daihere1993/cordova-plugin-native-webview

Dependencies

If you want use sharing feature, you need add cordova-plugin-wechat.

cordova plugin add cordova-plugin-wechat --variable wechatappid=YOUR_WECHAT_APPID

Configuration

Configure plugin colors in config.xml

<preference name="NativeWebViewNavBarColor" value="#ffffff" />
<preference name="NativeWebViewProgressBarColor" value="#059aef" />
<preference name="NativeWebViewIconButtonColor" value="#000" />

Useage

/**
 * url(String): web resouces url.
 * enableShare(Boolean): Whether enable sharing.
 * title(String): Webview title, if null, will get webview internal title.
 * thumbImageUrl(String): Thumb image url for sharing wechat.
 */
NativeWebView.oepn(url, enableShare, { title: title, thumbImageUrl: thumbImageUrl });

LICENSE

MIT LICENSE