mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-05-16 19:09:18 +08:00
Merge pull request #29174 from tn0502/tn0502/rn-usewebkit
react-native: Added useWebKit property to WebViewProps.
This commit is contained in:
7
types/react-native/index.d.ts
vendored
7
types/react-native/index.d.ts
vendored
@@ -1,4 +1,4 @@
|
||||
// Type definitions for react-native 0.56
|
||||
// Type definitions for react-native 0.57
|
||||
// Project: https://github.com/facebook/react-native
|
||||
// Definitions by: Eloy Durán <https://github.com/alloy>
|
||||
// HuHuanming <https://github.com/huhuanming>
|
||||
@@ -2244,6 +2244,11 @@ export interface WebViewPropsIOS {
|
||||
* `WebView`. The default value is `true`.
|
||||
*/
|
||||
scrollEnabled?: boolean;
|
||||
|
||||
/**
|
||||
* If `true`, use WKWebView instead of UIWebView.
|
||||
*/
|
||||
useWebKit?: boolean;
|
||||
}
|
||||
|
||||
export interface WebViewUriSource {
|
||||
|
||||
@@ -663,10 +663,11 @@ class WebViewTest extends React.Component {
|
||||
render() {
|
||||
return (
|
||||
<WebView
|
||||
originWhitelist={['https://origin.test']}
|
||||
saveFormDataDisabled={false}
|
||||
nativeConfig={{ component: 'test', props: {}, viewManager: {} }}
|
||||
onShouldStartLoadWithRequest={(event) => event.navigationType !== 'formresubmit'}
|
||||
originWhitelist={['https://origin.test']}
|
||||
saveFormDataDisabled={false}
|
||||
useWebKit={true}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user