Socket
Socket
Sign inDemoInstall

react-native-webview

Package Overview
Dependencies
Maintainers
2
Versions
326
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-native-webview - npm Package Compare versions

Comparing version 1.0.3 to 1.0.4

src/main/java/com/heng/webview/NavigationStateChangeEvent.java

22

index.js

@@ -7,4 +7,2 @@ var React = require('react-native');

var NativeWebView = requireNativeComponent('RCTWebView',WebView);
var WEBVIEW_REF = 'webview';

@@ -20,6 +18,15 @@

javaScriptEnabledAndroid: PropTypes.bool,
onNavigationStateChange: PropTypes.func
},
_onNavigationStateChange: function(event){
if(this.props.onNavigationStateChange){
this.props.onNavigationStateChange(event.nativeEvent);
}
},
_getWebViewHandle: function(){
return React.findNodeHandle(this.refs[WEBVIEW_REF]);
},
goBack: function(){
UIManager.dispatchViewManagerCommand(
React.findNodeHandle(this.refs.webview),
_getWebViewHandle,
UIManager.RCTWebView.Commands.goBack,

@@ -31,3 +38,3 @@ null,

UIManager.dispatchViewManagerCommand(
React.findNodeHandle(this.refs.webview),
_getWebViewHandle,
UIManager.RCTWebView.Commands.goForward,

@@ -39,3 +46,3 @@ null,

UIManager.dispatchViewManagerCommand(
React.findNodeHandle(this.refs.webview),
_getWebViewHandle,
UIManager.RCTWebView.Commands.reload,

@@ -48,4 +55,5 @@ null,

<NativeWebView
ref={WEBVIEW_REF}
{...this.props}
ref={WEBVIEW_REF}
onNavigationStateChange={this._onNavigationStateChange}
/>

@@ -56,2 +64,4 @@ );

var NativeWebView = requireNativeComponent('RCTWebView',WebView);
module.exports = WebView;
{
"name": "react-native-webview",
"version": "1.0.3",
"version": "1.0.4",
"description": "andorid webview for react-native",

@@ -5,0 +5,0 @@ "main": "index.js",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc