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
Copy file name to clipboardExpand all lines: specs/IsNonClientRegionSupportEnabled.md
+13-9Lines changed: 13 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,17 +1,21 @@
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 nonclient regions. We currently have limited support for title bar aka draggable regions, and are working on building out support for caption control 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 draggable regions and are working on building out support for caption control and resize regions.
4
4
5
-
For security and flexibility, we want developers to be able to enable or disable all custom nonclient functionality per WebView. Nonclient 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 nonclient support via a setting is the better solution.
5
+
For security and flexibility, we want developers to be able to enable or disable all custom nonclient functionality per WebView. Nonclient 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 nonclient support via a setting is the better solution.
6
6
7
7
# Description
8
-
`IsNonClientRegionSupportEnabled` defaults to `false`. Disabling/Enabling `IsNonClientRegionSupportEnabled` takes effect after the next navigation.
8
+
`IsNonClientRegionSupportEnabled` defaults to `FALSE`. Disabling/Enabling `IsNonClientRegionSupportEnabled` takes effect after the next navigation. Currently, draggable regions are the only nonclient experience we have implemented. Eventually, this setting will expand to enable other nonclient functionality, such as resize and caption controls.
9
9
10
-
When the setting is set to `true`, then the following non-client region support will be enabled:
11
-
* Draggable Regions will support dragging of the app and webview, the title bar context menu upon right click, and the maximizing to fill the window and restoring the window size upon double click of the html element.
10
+
When the setting is set to `TRUE`, then the following non-client region support will be enabled:
12
11
13
-
When set to `false`, then all non-client region support will be disabled.
14
-
* Web pages will not be able to use the `app-region` CSS style.
12
+
* Web pages will be able to use the `app-region` CSS style.
13
+
14
+
* Draggable Regions declared with the CSS style `app-region: drag` will support title bar functionality, for example, the dragging of the app window, the title bar context menu upon right click, and the maximizing/ restoring of the window size upon double click of the html element.
15
+
16
+
When set to `FALSE`, then all non-client region support will be disabled.
17
+
18
+
* Web pages will not be able to use the `app-region` CSS style.
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`.
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`.
45
49
46
50
# API Notes
47
51
See [API Details](#api-details) section below for API reference.
0 commit comments