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
+28-19Lines changed: 28 additions & 19 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,25 +1,32 @@
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
4
-
limited support for title bar aka draggable regions and are working on building out support for caption controls and resize regions.
5
-
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
7
-
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
8
-
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.
3
+
To improve the developer experience for customizing non-client regions, WebView2 is
4
+
working to support using DOM elements as non-client regions. We currently have limited
5
+
support for title bar aka draggable regions and are working on building out support
6
+
for caption controls and resize regions.
7
+
8
+
For security and flexibility, we want developers to be able to enable or disable all
9
+
custom non-client functionality per WebView. Non-client functionality will affect that
10
+
app window’s size and position so it’s important that developers can definitively
11
+
toggle access. This can be achieved in a limited way using a feature flag, but feature
12
+
flags are applied per WebView2 environment, thus, an API on the WebView2 to enable/disable
13
+
non-client support via a setting is the better solution.
9
14
10
15
# Description
11
-
`IsNonClientRegionSupportEnabled` defaults to `FALSE`. Disabling/Enabling `IsNonClientRegionSupportEnabled` takes effect after the next navigation. Currently,
12
-
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
13
-
and caption controls.
14
-
15
-
When the setting is set to `TRUE`, then the following non-client region support for the top level document will be enabled:
16
+
`IsNonClientRegionSupportEnabled` defaults to `FALSE`. Disabling/Enabling
17
+
`IsNonClientRegionSupportEnabled` takes effect after the next navigation. Currently, draggable
18
+
regions is the only non-client experience we have implemented. Eventually, this setting will
19
+
expand to enable other non-client functionality, such as resize and caption controls.
16
20
21
+
When the setting is set to `TRUE`, then the following non-client region support for the top
22
+
level document will be enabled:
17
23
* Web pages will be able to use the `app-region` CSS style.
18
-
19
-
* 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.
24
+
* Draggable Regions declared with the CSS style `app-region: drag` will support title bar
25
+
functionality, for example, the dragging of the app window, the title bar context menu upon
26
+
right click, and the maximizing/restoring of the window size upon double click of the html
27
+
element.
20
28
21
29
When set to `FALSE`, then all non-client region support will be disabled.
22
-
23
30
* Web pages will not be able to use the `app-region` CSS style.
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
132
-
creation. To provide greater flexibility of use, we decided to implement it as a setting.
139
+
We considered implementing the APIs in the ControllerOptions class, which would establish
140
+
whether non-client regions would be supported for the life of the webview at creation. To
141
+
provide greater flexibility of use, we decided to implement it as a setting.
0 commit comments