mirror of
https://github.com/status-im/react-native-webview-bridge.git
synced 2026-08-31 05:11:12 +00:00
Remove the unspecified dependency methods
This commit is contained in:
@@ -15,8 +15,6 @@
|
||||
|
||||
var React = require('react');
|
||||
var ReactNative = require('react-native');
|
||||
var invariant = require('invariant');
|
||||
var keyMirror = require('keymirror');
|
||||
var resolveAssetSource = require('react-native/Libraries/Image/resolveAssetSource');
|
||||
|
||||
var {
|
||||
@@ -37,11 +35,11 @@ var { PropTypes } = React;
|
||||
|
||||
var RCT_WEBVIEWBRIDGE_REF = 'webviewbridge';
|
||||
|
||||
var WebViewBridgeState = keyMirror({
|
||||
var WebViewBridgeState = {
|
||||
IDLE: null,
|
||||
LOADING: null,
|
||||
ERROR: null,
|
||||
});
|
||||
};
|
||||
|
||||
var RCTWebViewBridge = requireNativeComponent('RCTWebViewBridge', WebViewBridge);
|
||||
|
||||
@@ -67,7 +65,7 @@ var WebViewBridge = React.createClass({
|
||||
};
|
||||
},
|
||||
|
||||
|
||||
|
||||
componentWillMount: function() {
|
||||
DeviceEventEmitter.addListener("webViewBridgeMessage", (body) => {
|
||||
const { onBridgeMessage } = this.props;
|
||||
|
||||
@@ -28,9 +28,6 @@ import {
|
||||
findNodeHandle
|
||||
} from 'react-native'
|
||||
|
||||
import invariant from 'fbjs/lib/invariant'
|
||||
import keyMirror from 'fbjs/lib/keyMirror'
|
||||
|
||||
import resolveAssetSource from 'react-native/Libraries/Image/resolveAssetSource';
|
||||
import processDecelerationRate from 'react-native/Libraries/Components/ScrollView/processDecelerationRate'
|
||||
import deprecatedPropType from 'react-native/Libraries/Utilities/deprecatedPropType'
|
||||
@@ -42,20 +39,20 @@ const { WebViewBridgeManager } = NativeModules
|
||||
var BGWASH = 'rgba(255,255,255,0.8)';
|
||||
var RCT_WEBVIEW_REF = 'webview';
|
||||
|
||||
var WebViewState = keyMirror({
|
||||
var WebViewState = {
|
||||
IDLE: null,
|
||||
LOADING: null,
|
||||
ERROR: null,
|
||||
});
|
||||
};
|
||||
|
||||
const NavigationType = keyMirror({
|
||||
const NavigationType = {
|
||||
click: true,
|
||||
formsubmit: true,
|
||||
backforward: true,
|
||||
reload: true,
|
||||
formresubmit: true,
|
||||
other: true,
|
||||
});
|
||||
};
|
||||
|
||||
const JSNavigationScheme = 'react-js-navigation';
|
||||
|
||||
@@ -361,10 +358,9 @@ class WebView extends React.Component {
|
||||
otherView = (this.props.renderLoading || defaultRenderLoading)();
|
||||
} else if (this.state.viewState === WebViewState.ERROR) {
|
||||
var errorEvent = this.state.lastErrorEvent;
|
||||
invariant(
|
||||
errorEvent != null,
|
||||
'lastErrorEvent expected to be non-null'
|
||||
);
|
||||
if (errorEvent != null) {
|
||||
throw new Error('lastErrorEvent expected to be non-null');
|
||||
}
|
||||
otherView = (this.props.renderError || defaultRenderError)(
|
||||
errorEvent.domain,
|
||||
errorEvent.code,
|
||||
|
||||
Reference in New Issue
Block a user