|
@@ -9,6 +9,12 @@ export interface WebViewNativeEvent {
|
9
|
9
|
readonly canGoForward: boolean;
|
10
|
10
|
}
|
11
|
11
|
|
|
12
|
+export interface WebViewIOSLoadRequestEvent extends WebViewNativeEvent {
|
|
13
|
+ target: number;
|
|
14
|
+ lockIdentifier: number;
|
|
15
|
+ navigationType: "click" | "formsubmit" | "backforward" | "reload" | "formresubmit" | "other";
|
|
16
|
+}
|
|
17
|
+
|
12
|
18
|
export interface WebViewProgressEvent extends WebViewNativeEvent {
|
13
|
19
|
readonly progress: number;
|
14
|
20
|
}
|
|
@@ -145,6 +151,14 @@ export interface IOSWebViewProps {
|
145
|
151
|
*/
|
146
|
152
|
scrollEnabled?: boolean;
|
147
|
153
|
|
|
154
|
+ /**
|
|
155
|
+ * If the value of this property is true, the scroll view stops on multiples
|
|
156
|
+ * of the scroll view’s bounds when the user scrolls.
|
|
157
|
+ * The default value is false.
|
|
158
|
+ * @platform ios
|
|
159
|
+ */
|
|
160
|
+ pagingEnabled?: boolean,
|
|
161
|
+
|
148
|
162
|
/**
|
149
|
163
|
* The amount by which the web view content is inset from the edges of
|
150
|
164
|
* the scroll view. Defaults to {top: 0, left: 0, bottom: 0, right: 0}.
|
|
@@ -182,7 +196,7 @@ export interface IOSWebViewProps {
|
182
|
196
|
* to stop loading.
|
183
|
197
|
* @platform ios
|
184
|
198
|
*/
|
185
|
|
- onShouldStartLoadWithRequest?: (event: WebViewNativeEvent) => any;
|
|
199
|
+ onShouldStartLoadWithRequest?: (event: WebViewIOSLoadRequestEvent) => any;
|
186
|
200
|
|
187
|
201
|
/**
|
188
|
202
|
* Boolean that determines whether HTML5 videos play inline or use the
|
|
@@ -202,7 +216,17 @@ export interface IOSWebViewProps {
|
202
|
216
|
/**
|
203
|
217
|
* If true, this will be able horizontal swipe gestures when using the WKWebView. The default value is `false`.
|
204
|
218
|
*/
|
205
|
|
- allowsBackForwardNavigationGestures?: boolean
|
|
219
|
+ allowsBackForwardNavigationGestures?: boolean;
|
|
220
|
+
|
|
221
|
+ /**
|
|
222
|
+ * A Boolean value that determines whether pressing on a link
|
|
223
|
+ * displays a preview of the destination for the link.
|
|
224
|
+ *
|
|
225
|
+ * This property is available on devices that support 3D Touch.
|
|
226
|
+ * In iOS 10 and later, the default value is `true`; before that, the default value is `false`.
|
|
227
|
+ * @platform ios
|
|
228
|
+ */
|
|
229
|
+ allowsLinkPreview?: boolean;
|
206
|
230
|
}
|
207
|
231
|
|
208
|
232
|
export interface AndroidWebViewProps {
|
|
@@ -374,7 +398,7 @@ export interface WebViewSharedProps extends ViewProps, IOSWebViewProps, AndroidW
|
374
|
398
|
* Boolean value that forces the `WebView` to show the loading view
|
375
|
399
|
* on the first load.
|
376
|
400
|
*/
|
377
|
|
- startInLoadingState?: string;
|
|
401
|
+ startInLoadingState?: boolean;
|
378
|
402
|
|
379
|
403
|
/**
|
380
|
404
|
* Set this to provide JavaScript that will be injected into the web page
|
|
@@ -421,5 +445,6 @@ export class WebView extends Component<WebViewSharedProps> {
|
421
|
445
|
public goBack: () => void;
|
422
|
446
|
public reload: () => void;
|
423
|
447
|
public stopLoading: () => void;
|
424
|
|
- public injectJavaScript: (js: string) => void
|
|
448
|
+ public postMessage: (msg: string) => void;
|
|
449
|
+ public injectJavaScript: (js: string) => void;
|
425
|
450
|
}
|