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
@@ -36,36 +36,36 @@ class WebViewOptions(msgspec.Struct, omit_defaults=True):
36
36
"""
37
37
title: str
38
38
"""Sets the title of the window."""
39
-
acceptFirstMouse: Optional[bool] =None
39
+
acceptFirstMouse: Union[bool|None] =None
40
40
"""Sets whether clicking an inactive window also clicks through to the webview. Default is false."""
41
-
autoplay: Optional[bool] =None
41
+
autoplay: Union[bool|None] =None
42
42
"""When true, all media can be played without user interaction. Default is false."""
43
-
clipboard: Optional[bool] =None
43
+
clipboard: Union[bool|None] =None
44
44
"""Enables clipboard access for the page rendered on Linux and Windows.
45
45
46
46
macOS doesn’t provide such method and is always enabled by default. But your app will still need to add menu item accelerators to use the clipboard shortcuts."""
47
-
decorations: Optional[bool] =None
47
+
decorations: Union[bool|None] =None
48
48
"""When true, the window will have a border, a title bar, etc. Default is true."""
49
-
devtools: Optional[bool] =None
49
+
devtools: Union[bool|None] =None
50
50
"""Enable or disable webview devtools.
51
51
52
52
Note this only enables devtools to the webview. To open it, you can call `webview.open_devtools()`, or right click the page and open it from the context menu."""
53
-
focused: Optional[bool] =None
53
+
focused: Union[bool|None] =None
54
54
"""Sets whether the webview should be focused when created. Default is false."""
55
-
incognito: Optional[bool] =None
55
+
incognito: Union[bool|None] =None
56
56
"""Run the WebView with incognito mode. Note that WebContext will be ingored if incognito is enabled.
57
57
58
58
Platform-specific: - Windows: Requires WebView2 Runtime version 101.0.1210.39 or higher, does nothing on older versions, see https://learn.microsoft.com/en-us/microsoft-edge/webview2/release-notes/archive?tabs=dotnetcsharp#10121039"""
59
-
initializationScript: Optional[str] =None
59
+
initializationScript: Union[str|None] =None
60
60
"""Run JavaScript code when loading new pages. When the webview loads a new page, this code will be executed. It is guaranteed that the code is executed before window.onload."""
61
-
ipc: Optional[bool] =None
61
+
ipc: Union[bool|None] =None
62
62
"""Sets whether host should be able to receive messages from the webview via `window.ipc.postMessage`."""
63
-
load: Optional[WebViewContent] =None
63
+
load: Union[WebViewContent|None] =None
64
64
"""The content to load into the webview."""
65
-
size: Optional[WindowSize] =None
65
+
size: Union[WindowSize|None] =None
66
66
"""The size of the window."""
67
-
transparent: Optional[bool] =None
67
+
transparent: Union[bool|None] =None
68
68
"""Sets whether the window should be transparent."""
69
-
userAgent: Optional[str] =None
69
+
userAgent: Union[str|None] =None
70
70
"""Sets the user agent to use when loading pages."""
"""Whether to enter fullscreen mode. If left unspecified, the window will enter fullscreen mode if it is not already in fullscreen mode or exit fullscreen mode if it is currently in fullscreen mode."""
"""Whether to maximize the window. If left unspecified, the window will be maximized if it is not already maximized or restored if it was previously maximized."""
"""Whether to minimize the window. If left unspecified, the window will be minimized if it is not already minimized or restored if it was previously minimized."""
"""What to set as the origin of the webview when loading html. If not specified, the origin will be set to the value of the `origin` field when the webview was created."""
0 commit comments