0.10.0-rc.0 • Published 4 years ago

react-native-tencentx5 v0.10.0-rc.0

Weekly downloads
6
License
-
Repository
github
Last release
4 years ago

react-native-tencentx5

Getting started

$ npm install react-native-tencentx5 --save

Link native dependencies

From react-native 0.60 autolinking

$ react-native link react-native-tencentx5

Usage

import { WebView } from 'react-native-tencentx5';

<WebView
  url={"https://facebook.github.io/react-native"}
  style={{ flex: 1 }}
/>

Props Index


Reference

Props

url

Loads static URI in the WebView.

TypeRequired
stringNo

Example:

<WebView
  url={'https://facebook.github.io/react-native'}
/>

style

A style object that allow you to customize the WebView style.

TypeRequired
styleNo

Example:

<WebView
  source={{ uri: 'https://facebook.github.io/react-native' }}
  style={{ flex: 1 }}
/>

onMessage

Function that is invoked when the webview calls window.WebViewJavascriptBridge.postMessage. Setting this property will inject this global into your webview.

window.WebViewJavascriptBridge.postMessage accepts one argument, data, which will be available on the event object, event.nativeEvent.data. data must be a string.

TypeRequired
functionNo

javaScriptEnabled

Boolean value to enable JavaScript in the WebView.

TypeRequired
boolNo

domStorageEnabled

Boolean value to control whether DOM Storage is enabled. Used only in Android.

TypeRequired
boolNo

userAgent

Sets the user-agent for the WebView.

TypeRequired
stringNo

cacheEnabled

Sets whether WebView should use browser caching.

TypeRequired
booleanNo

textZoom

If the user has set a custom font size in the Android system, an undesirable scale of the site interface in WebView occurs.

TypeRequired
numberNo