<WebView>: Add propType for injectJavaScript

Summary:
Small fix. Adds a proptype for the injectJavaScript function, added in da9a712a9e.
Closes https://github.com/facebook/react-native/pull/12665

Differential Revision: D4645803

Pulled By: hramos

fbshipit-source-id: 863e5bf82b853914ac08f9f5b2c141d35882afc7
This commit is contained in:
Luke Miles 2017-03-02 15:24:27 -08:00 committed by Facebook Github Bot
parent 77b8c09727
commit 13b4c2d77b
2 changed files with 12 additions and 0 deletions

View File

@ -160,6 +160,12 @@ class WebView extends React.Component {
* @platform android
*/
allowUniversalAccessFromFileURLs: PropTypes.bool,
/**
* Function that accepts a string that will be passed to the WebView and
* executed immediately as JavaScript.
*/
injectJavaScript: PropTypes.func,
};
static defaultProps = {

View File

@ -334,6 +334,12 @@ class WebView extends React.Component {
* to tap them before they start playing. The default value is `true`.
*/
mediaPlaybackRequiresUserAction: PropTypes.bool,
/**
* Function that accepts a string that will be passed to the WebView and
* executed immediately as JavaScript.
*/
injectJavaScript: PropTypes.func,
};
state = {