|
@@ -264,6 +264,30 @@ Function that allows custom handling of any web view requests. Return `true` fro
|
264
|
264
|
| -------- | -------- | -------- |
|
265
|
265
|
| function | No | iOS |
|
266
|
266
|
|
|
267
|
+Example:
|
|
268
|
+
|
|
269
|
+```jsx
|
|
270
|
+<WebView
|
|
271
|
+ source={{ uri: "https://infinite.red" }}
|
|
272
|
+ onShouldStartLoadWithRequest={(request) => {
|
|
273
|
+ // Only allow navigating within this website
|
|
274
|
+ return request.url.startsWith("https://infinite.red")
|
|
275
|
+ }}
|
|
276
|
+/>
|
|
277
|
+```
|
|
278
|
+
|
|
279
|
+The `request` object includes these properties:
|
|
280
|
+
|
|
281
|
+```
|
|
282
|
+title
|
|
283
|
+url
|
|
284
|
+target
|
|
285
|
+canGoBack
|
|
286
|
+canGoForward
|
|
287
|
+lockIdentifier
|
|
288
|
+navigationType
|
|
289
|
+```
|
|
290
|
+
|
267
|
291
|
---
|
268
|
292
|
|
269
|
293
|
### `startInLoadingState`
|