mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-05-19 04:52:51 +08:00
Add onContentSizeChange prop to WebView
Summary: Added support for WebViews to take in an onContentSizeChange prop, which will return a native event that contains the width and height of the html content in the WebView. Also moved the ContentSizeChangeEvent from the recyclerview dir to the uimanager/events dir Reviewed By: andreicoman11 Differential Revision: D3775399 fbshipit-source-id: 19a0579f8345e5853cc7311b80f1f1393c77ab58
This commit is contained in:
committed by
Facebook Github Bot 8
parent
101190f7f8
commit
22de6550d6
@@ -58,6 +58,7 @@ class WebView extends React.Component {
|
||||
automaticallyAdjustContentInsets: PropTypes.bool,
|
||||
contentInset: EdgeInsetsPropType,
|
||||
onNavigationStateChange: PropTypes.func,
|
||||
onContentSizeChange: PropTypes.func,
|
||||
startInLoadingState: PropTypes.bool, // force WebView to show loadingView on first load
|
||||
style: View.propTypes.style,
|
||||
|
||||
@@ -219,6 +220,7 @@ class WebView extends React.Component {
|
||||
domStorageEnabled={this.props.domStorageEnabled}
|
||||
contentInset={this.props.contentInset}
|
||||
automaticallyAdjustContentInsets={this.props.automaticallyAdjustContentInsets}
|
||||
onContentSizeChange={this.props.onContentSizeChange}
|
||||
onLoadingStart={this.onLoadingStart}
|
||||
onLoadingFinish={this.onLoadingFinish}
|
||||
onLoadingError={this.onLoadingError}
|
||||
|
||||
Reference in New Issue
Block a user