|
1 | 1 | # Background |
2 | 2 |
|
3 | | -To improve the developer experience for customizing non-client regions, WebView2 is working to support using DOM elements as non-client regions. We currently have limited support for title bar aka draggable regions and are working on building out support for caption controls and resize regions. |
| 3 | +To improve the developer experience for customizing non-client regions, WebView2 is working to support using DOM elements as non-client regions. We currently have limited support for title bar aka |
| 4 | +draggable regions and are working on building out support for caption controls and resize regions. |
4 | 5 |
|
5 | | -For security and flexibility, we want developers to be able to enable or disable all custom non-client functionality per WebView. Non-client functionality will affect that app window’s size and position so it’s important that developers can definitively toggle access.This can be achieved in a limited way using a feature flag, but feature flags are applied per WebView2 environment, thus, an API on the WebView2 to enable/disable non-client support via a setting is the better solution. |
| 6 | +For security and flexibility, we want developers to be able to enable or disable all custom non-client functionality per WebView. Non-client functionality will affect that app window’s size and position so |
| 7 | +it’s important that developers can definitively toggle access. This can be achieved in a limited way using a feature flag, but feature flags are applied per WebView2 environment, thus, an API on the |
| 8 | +WebView2 to enable/disable non-client support via a setting is the better solution. |
6 | 9 |
|
7 | 10 | # Description |
8 | | -`IsNonClientRegionSupportEnabled` defaults to `FALSE`. Disabling/Enabling `IsNonClientRegionSupportEnabled` takes effect after the next navigation. Currently, draggable regions is the only non-client experience we have implemented. Eventually, this setting will expand to enable other non-client functionality, such as resize and caption controls. |
| 11 | +`IsNonClientRegionSupportEnabled` defaults to `FALSE`. Disabling/Enabling `IsNonClientRegionSupportEnabled` takes effect after the next navigation. Currently, draggable regions is the only non-client |
| 12 | +experience we have implemented. Eventually, this setting will expand to enable other non-client functionality, such as resize and caption controls. |
9 | 13 |
|
10 | | -When the setting is set to `TRUE`, then the following non-client region support will be enabled: |
| 14 | +When the setting is set to `TRUE`, then the following non-client region support for the top level document will be enabled: |
11 | 15 |
|
12 | 16 | * Web pages will be able to use the `app-region` CSS style. |
13 | 17 |
|
@@ -45,7 +49,8 @@ void ToggleNonClientRegionSupportEnabled() |
45 | 49 | ``` |
46 | 50 |
|
47 | 51 | # Remarks |
48 | | -If the flag is used to enable draggable regions in additional browser arguments, draggable region support will remain enabled even if `IsNonClientRegionSupportEnabled` setting is `FALSE`. |
| 52 | +If the feature flag for enabling the app-region CSS style is used to enable draggable regions in additional browser arguments, draggable region support will remain enabled even if the |
| 53 | +`IsNonClientRegionSupportEnabled` setting is `FALSE`. |
49 | 54 |
|
50 | 55 | # API Notes |
51 | 56 | See [API Details](#api-details) section below for API reference. |
@@ -84,4 +89,5 @@ interface ICoreWebView2Settings9 : ICoreWebView2Settings8 { |
84 | 89 | ``` |
85 | 90 |
|
86 | 91 | # Appendix |
87 | | -We considered implementing the APIs in the ControllerOptions class, which would establish whether non-client regions would be supported for the life of the webview at creation. To provide greater flexibility of use, we decided to implement it as a setting. |
| 92 | +We considered implementing the APIs in the ControllerOptions class, which would establish whether non-client regions would be supported for the life of the webview at creation. To provide greater |
| 93 | +flexibility of use, we decided to implement it as a setting. |
0 commit comments