mirror of
https://github.com/status-im/react-native.git
synced 2025-01-12 02:24:23 +00:00
Remove extra WKWebView file not used (#21182)
Summary: This file was created recently but is not used as the WKWebview was integrated directly into the Webview.ios.js Removing this file to clarify the situation Pull Request resolved: https://github.com/facebook/react-native/pull/21182 Differential Revision: D9942905 Pulled By: hramos fbshipit-source-id: 19e9fba94280428edd1deab4a54f8c5dc42a6bfa
This commit is contained in:
parent
6b0512c819
commit
ea124a044c
@ -1,42 +0,0 @@
|
|||||||
/**
|
|
||||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
||||||
*
|
|
||||||
* This source code is licensed under the MIT license found in the
|
|
||||||
* LICENSE file in the root directory of this source tree.
|
|
||||||
*
|
|
||||||
* @format
|
|
||||||
* @flow
|
|
||||||
* @providesModule WKWebView
|
|
||||||
*/
|
|
||||||
|
|
||||||
const React = require('react');
|
|
||||||
|
|
||||||
const requireNativeComponent = require('requireNativeComponent');
|
|
||||||
|
|
||||||
const RCTWKWebView = requireNativeComponent('RCTWKWebView');
|
|
||||||
|
|
||||||
type RCTWKWebViewProps = {
|
|
||||||
allowsInlineMediaPlayback?: boolean,
|
|
||||||
mediaPlaybackRequiresUserAction?: boolean,
|
|
||||||
dataDetectorTypes?: boolean,
|
|
||||||
};
|
|
||||||
|
|
||||||
class WKWebView extends React.Component<RCTWKWebViewProps> {
|
|
||||||
componentWillReceiveProps(nextProps: RCTWKWebViewProps) {
|
|
||||||
this.showRedboxOnPropChanges(nextProps, 'allowsInlineMediaPlayback');
|
|
||||||
this.showRedboxOnPropChanges(nextProps, 'mediaPlaybackRequiresUserAction');
|
|
||||||
this.showRedboxOnPropChanges(nextProps, 'dataDetectorTypes');
|
|
||||||
}
|
|
||||||
|
|
||||||
showRedboxOnPropChanges(nextProps: RCTWKWebViewProps, propName: string) {
|
|
||||||
if (this.props[propName] !== nextProps[propName]) {
|
|
||||||
console.error(`Changes to property ${propName} do nothing after the initial render.`);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
render() {
|
|
||||||
return <RCTWKWebView {...this.props}/>;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
module.exports = WKWebView;
|
|
Loading…
x
Reference in New Issue
Block a user