You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Extract the WebView component out of core and into an extension (#1101)
* Extract the WebView component out of core and into an extension
* Fix a race condition that could result in accurate test results in RXP Test
* Resolve Github review nit
* Fix typo
This component displays HTML contents in an embedded browser control.
11
-
12
-
To limit the functionality of the browser control, specify one or more sandbox options. For detailed definitions of sandbox flags, refer to the [HTML documentation](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/iframe).
13
-
14
-
15
-
## Types
16
-
```javascript
17
-
enum WebViewSandboxMode {
18
-
None =0,
19
-
AllowForms =1<<0,
20
-
AllowModals =1<<1,
21
-
AllowOrientationLock =1<<2,
22
-
AllowPointerLock =1<<3,
23
-
AllowPopups =1<<4,
24
-
AllowPopupsToEscapeSandbox =1<<5,
25
-
AllowPresentation =1<<6,
26
-
AllowSameOrigin =1<<7,
27
-
AllowScripts =1<<8,
28
-
AllowTopNavigation =1<<9,
29
-
30
-
// Control https mixed content behavior, never by default
31
-
AllowMixedContentAlways =1<<10,
32
-
AllowMixedContentCompatibilityMode =1<<11
33
-
}
34
-
35
-
interface WebViewNavigationState {
36
-
canGoBack: boolean;
37
-
canGoForward: boolean;
38
-
loading: boolean;
39
-
url: string;
40
-
title: string;
41
-
readonly navigationType:
42
-
|'click'
43
-
|'formsubmit'
44
-
|'backforward'
45
-
|'reload'
46
-
|'formresubmit'
47
-
|'other';
48
-
}
49
-
50
-
interface WebViewErrorState {
51
-
description: string;
52
-
domain: string;
53
-
code: string;
54
-
}
55
-
56
-
interface WebViewSource {
57
-
html: string;
58
-
baseUrl?: string; // Native only
59
-
}
60
-
```
61
-
62
-
## Props
63
-
```javascript
64
-
// Allow javascript code to call storage methods?
65
-
domStorageEnabled: boolean =true; // Native only
66
-
67
-
// JavaScript code that is injected into the control and executed
68
-
injectedJavaScript: string =undefined; // Native only
69
-
70
-
// Is JavaScript executed within the control?
71
-
javaScriptEnabled: boolean =true;
72
-
73
-
// Determines whether HTML5 audio and video requires the user to tap them before they start playing.
74
-
mediaPlaybackRequiresUserAction: boolean =true; // Native only
75
-
76
-
// Determines whether HTML5 videos play inline or use the native full-screen controller.
77
-
allowsInlineMediaPlayback: boolean =false; // iOS only
Copy file name to clipboardExpand all lines: docs/docs/extensions/virtuallistview.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,6 +4,7 @@ title: VirtualListView
4
4
layout: docs
5
5
category: Extensions
6
6
permalink: docs/extensions/virtuallistview.html
7
+
next: extensions/webview
7
8
---
8
9
9
10
This components supports a vertical list of items within a scrolling area. The visible portion of the list is referred to as the "view port". The list is virtualized, which means that items are rendered only when they are within the view port (or just above or below the view port).
This component displays HTML contents in an embedded browser control.
10
+
11
+
To limit the functionality of the browser control, specify one or more sandbox options. For detailed definitions of sandbox flags, refer to the [HTML documentation](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/iframe).
12
+
13
+
14
+
## Types
15
+
```javascript
16
+
enum WebViewSandboxMode {
17
+
None =0,
18
+
AllowForms =1<<0,
19
+
AllowModals =1<<1,
20
+
AllowOrientationLock =1<<2,
21
+
AllowPointerLock =1<<3,
22
+
AllowPopups =1<<4,
23
+
AllowPopupsToEscapeSandbox =1<<5,
24
+
AllowPresentation =1<<6,
25
+
AllowSameOrigin =1<<7,
26
+
AllowScripts =1<<8,
27
+
AllowTopNavigation =1<<9,
28
+
29
+
// Control https mixed content behavior, never by default
30
+
AllowMixedContentAlways =1<<10,
31
+
AllowMixedContentCompatibilityMode =1<<11
32
+
}
33
+
34
+
interface WebViewNavigationState {
35
+
canGoBack: boolean;
36
+
canGoForward: boolean;
37
+
loading: boolean;
38
+
url: string;
39
+
title: string;
40
+
readonly navigationType:
41
+
|'click'
42
+
|'formsubmit'
43
+
|'backforward'
44
+
|'reload'
45
+
|'formresubmit'
46
+
|'other';
47
+
}
48
+
49
+
interface WebViewErrorState {
50
+
description: string;
51
+
domain: string;
52
+
code: string;
53
+
}
54
+
55
+
interface WebViewSource {
56
+
html: string;
57
+
baseUrl?: string; // Native only
58
+
}
59
+
```
60
+
61
+
## Props
62
+
```javascript
63
+
// Allow javascript code to call storage methods?
64
+
domStorageEnabled: boolean =true; // Native only
65
+
66
+
// JavaScript code that is injected into the control and executed
67
+
injectedJavaScript: string =undefined; // Native only
68
+
69
+
// Is JavaScript executed within the control?
70
+
javaScriptEnabled: boolean =true;
71
+
72
+
// Determines whether HTML5 audio and video requires the user to tap them before they start playing.
73
+
mediaPlaybackRequiresUserAction: boolean =true; // Native only
74
+
75
+
// Determines whether HTML5 videos play inline or use the native full-screen controller.
76
+
allowsInlineMediaPlayback: boolean =false; // iOS only
This module provides a cross-platform control that allows the display of an independent web page within the [ReactXP](https://microsoft.github.io/reactxp/) library. This used to be a part of ReactXP core, but was extracted to be a standalone module inline with React Native `Lean Core` initiative. This exists as a standalone module to prevent users of ReactXP from having to link native modules when getting started.
3
+
4
+
## Getting Started
5
+
This module relies on [react-native-webview](https://www.npmjs.com/package/react-native-webview) and will need to be linked into the react-native project.
6
+
This can be done by following the linking instructions in the React Native documentation or by running
7
+
```react-native link react-native-webview```
8
+
9
+
## Documentation
10
+
For detailed documentation, look [here](https://microsoft.github.io/reactxp/docs/extensions/webview.html).
This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments.
17
+
18
+
You must sign a Contribution License Agreement (CLA) before your PR will be merged. This a one-time requirement for Microsoft projects in GitHub. You can read more about [Contribution License Agreements (CLA)](https://en.wikipedia.org/wiki/Contributor_License_Agreement) on Wikipedia. You can sign the Microsoft Contribution License Agreement by visiting https://cla.microsoft.com/. Use your GitHub account to login.
19
+
20
+
## License
21
+
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details
0 commit comments