-
Notifications
You must be signed in to change notification settings - Fork 4
/
index.js
45 lines (40 loc) · 1.19 KB
/
index.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
/**
* @providesModule WebViewAndroid
*/
'use strict';
var React = require('react-native');
var { requireNativeComponent, PropTypes } = React;
var RCTUIManager = React.NativeModules.UIManager;
var WEBVIEW_REF = 'androidWebView';
var WebViewAndroid = React.createClass({
propTypes: {
url: PropTypes.string,
baseUrl: PropTypes.string,
html: PropTypes.string,
htmlCharset: PropTypes.string,
userAgent: PropTypes.string,
injectedJavaScript: PropTypes.string,
disablePlugins: PropTypes.bool,
disableCookies: PropTypes.bool,
javaScriptEnabled: PropTypes.bool,
geolocationEnabled: PropTypes.bool,
builtInZoomControls: PropTypes.bool,
onNavigationStateChange: PropTypes.func
},
_onNavigationStateChange: function(event) {
},
goBack: function() {
},
goForward: function() {
},
reload: function() {
},
render: function() {
return <RNWebViewAndroid ref={WEBVIEW_REF} {...this.props} onNavigationStateChange={this._onNavigationStateChange} />;
},
_getWebViewHandle: function() {
return React.findNodeHandle(this.refs[WEBVIEW_REF]);
},
});
var RNWebViewAndroid = requireNativeComponent('RNWebViewAndroid', null);
module.exports = WebViewAndroid;