@anvil-works/anvil-pyright 0.0.1 → 0.0.2-canary

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (98) hide show
  1. package/dist/anvil-typeshed/TODOS.md +70 -0
  2. package/dist/anvil-typeshed/client/anvil/__init__.pyi +1291 -0
  3. package/dist/anvil-typeshed/client/anvil/__pycache__/server.cpython-39.pyc +0 -0
  4. package/dist/anvil-typeshed/client/anvil/email.pyi +152 -0
  5. package/dist/anvil-typeshed/client/anvil/facebook/__init__.pyi +8 -0
  6. package/dist/anvil-typeshed/client/anvil/facebook/auth.pyi +30 -0
  7. package/dist/anvil-typeshed/client/anvil/google/__init__.pyi +11 -0
  8. package/dist/anvil-typeshed/client/anvil/google/auth.pyi +37 -0
  9. package/dist/anvil-typeshed/client/anvil/google/drive.pyi +98 -0
  10. package/dist/anvil-typeshed/client/anvil/google/sheets.pyi +98 -0
  11. package/dist/anvil-typeshed/client/anvil/http.pyi +66 -0
  12. package/dist/anvil-typeshed/client/anvil/image.pyi +30 -0
  13. package/dist/anvil-typeshed/client/anvil/js/__init__.pyi +143 -0
  14. package/dist/anvil-typeshed/client/anvil/js/window/__init__.pyi +2935 -0
  15. package/dist/anvil-typeshed/client/anvil/media.pyi +46 -0
  16. package/dist/anvil-typeshed/client/anvil/microsoft/__init__.pyi +8 -0
  17. package/dist/anvil-typeshed/client/anvil/microsoft/auth.pyi +34 -0
  18. package/dist/anvil-typeshed/client/anvil/mpl_util.pyi +29 -0
  19. package/dist/anvil-typeshed/client/anvil/plotly_templates.pyi +15 -0
  20. package/dist/anvil-typeshed/client/anvil/saml/__init__.pyi +8 -0
  21. package/dist/anvil-typeshed/client/anvil/saml/auth.pyi +24 -0
  22. package/dist/anvil-typeshed/client/anvil/secrets.pyi +22 -0
  23. package/dist/anvil-typeshed/client/anvil/server.pyi +376 -0
  24. package/dist/anvil-typeshed/client/anvil/stripe.pyi +23 -0
  25. package/dist/anvil-typeshed/client/anvil/tables/__init__.pyi +297 -0
  26. package/dist/anvil-typeshed/client/anvil/tables/query.pyi +88 -0
  27. package/dist/anvil-typeshed/client/anvil/tz.pyi +92 -0
  28. package/dist/anvil-typeshed/client/anvil/users/__init__.pyi +191 -0
  29. package/dist/anvil-typeshed/client/anvil/users/mfa.pyi +76 -0
  30. package/dist/anvil-typeshed/client/stripe/__init__.pyi +8 -0
  31. package/dist/anvil-typeshed/client/stripe/checkout.pyi +67 -0
  32. package/dist/anvil-typeshed/server/anvil/__init__.pyi +148 -0
  33. package/dist/anvil-typeshed/server/anvil/email.pyi +188 -0
  34. package/dist/anvil-typeshed/server/anvil/facebook/__init__.pyi +8 -0
  35. package/dist/anvil-typeshed/server/anvil/facebook/auth.pyi +27 -0
  36. package/dist/anvil-typeshed/server/anvil/files.pyi +53 -0
  37. package/dist/anvil-typeshed/server/anvil/google/__init__.pyi +11 -0
  38. package/dist/anvil-typeshed/server/anvil/google/auth.pyi +31 -0
  39. package/dist/anvil-typeshed/server/anvil/google/drive.pyi +98 -0
  40. package/dist/anvil-typeshed/server/anvil/google/mail.pyi +24 -0
  41. package/dist/anvil-typeshed/server/anvil/google/sheets.pyi +98 -0
  42. package/dist/anvil-typeshed/server/anvil/http.pyi +66 -0
  43. package/dist/anvil-typeshed/server/anvil/image.pyi +30 -0
  44. package/dist/anvil-typeshed/server/anvil/media.pyi +32 -0
  45. package/dist/anvil-typeshed/server/anvil/microsoft/__init__.pyi +8 -0
  46. package/dist/anvil-typeshed/server/anvil/microsoft/auth.pyi +31 -0
  47. package/dist/anvil-typeshed/server/anvil/mpl_util.pyi +29 -0
  48. package/dist/anvil-typeshed/server/anvil/pdf.pyi +61 -0
  49. package/dist/anvil-typeshed/server/anvil/plotly_templates.pyi +15 -0
  50. package/dist/anvil-typeshed/server/anvil/saml/__init__.pyi +8 -0
  51. package/dist/anvil-typeshed/server/anvil/saml/auth.pyi +21 -0
  52. package/dist/anvil-typeshed/server/anvil/secrets.pyi +22 -0
  53. package/dist/anvil-typeshed/server/anvil/server.pyi +470 -0
  54. package/dist/anvil-typeshed/server/anvil/stripe.pyi +23 -0
  55. package/dist/anvil-typeshed/server/anvil/tables/__init__.pyi +319 -0
  56. package/dist/anvil-typeshed/server/anvil/tables/query.pyi +88 -0
  57. package/dist/anvil-typeshed/server/anvil/tz.pyi +92 -0
  58. package/dist/anvil-typeshed/server/anvil/users/__init__.pyi +83 -0
  59. package/dist/anvil-typeshed/server/anvil/users/mfa.pyi +65 -0
  60. package/dist/anvil-typeshed/server/stripe/__init__.pyi +8 -0
  61. package/dist/anvil-typeshed/server/stripe/checkout.pyi +9 -0
  62. package/dist/anvil-typeshed/source/anvil/__init__.pyi +1306 -0
  63. package/dist/anvil-typeshed/source/anvil/email.pyi +188 -0
  64. package/dist/anvil-typeshed/source/anvil/facebook/__init__.pyi +4 -0
  65. package/dist/anvil-typeshed/source/anvil/facebook/auth.pyi +28 -0
  66. package/dist/anvil-typeshed/source/anvil/files.pyi +50 -0
  67. package/dist/anvil-typeshed/source/anvil/google/__init__.pyi +7 -0
  68. package/dist/anvil-typeshed/source/anvil/google/auth.pyi +35 -0
  69. package/dist/anvil-typeshed/source/anvil/google/drive.pyi +94 -0
  70. package/dist/anvil-typeshed/source/anvil/google/mail.pyi +21 -0
  71. package/dist/anvil-typeshed/source/anvil/google/sheets.pyi +94 -0
  72. package/dist/anvil-typeshed/source/anvil/http.pyi +62 -0
  73. package/dist/anvil-typeshed/source/anvil/image.pyi +26 -0
  74. package/dist/anvil-typeshed/source/anvil/js/__init__.pyi +140 -0
  75. package/dist/anvil-typeshed/source/anvil/js/window/__init__.pyi +2932 -0
  76. package/dist/anvil-typeshed/source/anvil/media.pyi +62 -0
  77. package/dist/anvil-typeshed/source/anvil/microsoft/__init__.pyi +4 -0
  78. package/dist/anvil-typeshed/source/anvil/microsoft/auth.pyi +32 -0
  79. package/dist/anvil-typeshed/source/anvil/mpl_util.pyi +25 -0
  80. package/dist/anvil-typeshed/source/anvil/pdf.pyi +58 -0
  81. package/dist/anvil-typeshed/source/anvil/plotly_templates.pyi +11 -0
  82. package/dist/anvil-typeshed/source/anvil/saml/__init__.pyi +4 -0
  83. package/dist/anvil-typeshed/source/anvil/saml/auth.pyi +22 -0
  84. package/dist/anvil-typeshed/source/anvil/secrets.pyi +18 -0
  85. package/dist/anvil-typeshed/source/anvil/server.pyi +511 -0
  86. package/dist/anvil-typeshed/source/anvil/stripe.pyi +19 -0
  87. package/dist/anvil-typeshed/source/anvil/tables/__init__.pyi +319 -0
  88. package/dist/anvil-typeshed/source/anvil/tables/query.pyi +84 -0
  89. package/dist/anvil-typeshed/source/anvil/tz.pyi +88 -0
  90. package/dist/anvil-typeshed/source/anvil/users/__init__.pyi +196 -0
  91. package/dist/anvil-typeshed/source/anvil/users/mfa.pyi +74 -0
  92. package/dist/anvil-typeshed/source/stripe/__init__.pyi +4 -0
  93. package/dist/anvil-typeshed/source/stripe/checkout.pyi +65 -0
  94. package/dist/pyright-langserver.js +1 -1
  95. package/dist/pyright-langserver.js.map +1 -1
  96. package/dist/pyright.js +1 -1
  97. package/dist/pyright.js.map +1 -1
  98. package/package.json +1 -1
@@ -0,0 +1,2932 @@
1
+ # @client-only-file
2
+ # AUTO-GENERATED from webtypy - https://github.com/pyodide/webtypy
3
+ # Run `npm run generate-anvil-dom-stubs` to regenerate
4
+ #
5
+ """The anvil.js.window module provides access to the browser's window object.
6
+
7
+ In Anvil, `window` is registered in `sys.modules` as `anvil.js.window`, allowing:
8
+
9
+ from anvil.js.window import document
10
+ from anvil.js.window import location
11
+ from anvil.js.window import HTMLDivElement
12
+
13
+ This module exports all window properties as module-level attributes for convenient access.
14
+ DOM types are also available for type annotations.
15
+
16
+ [Anvil Docs](https://anvil.works/docs/client/javascript)
17
+
18
+ Generated from WebIDL specifications via webtypy.
19
+ """
20
+
21
+ from typing import Any, Awaitable, Callable, Sequence, overload
22
+
23
+ class EventTarget:
24
+ @classmethod
25
+ def new(self) -> EventTarget: ...
26
+ def addEventListener(self, type: str, callback: EventListener | None, options: AddEventListenerOptions | bool | None = {}) -> None: ...
27
+ def removeEventListener(self, type: str, callback: EventListener | None, options: EventListenerOptions | bool | None = {}) -> None: ...
28
+ def dispatchEvent(self, event: Event) -> bool: ...
29
+
30
+ class Event:
31
+ @classmethod
32
+ def new(self, type: str, eventInitDict: EventInit | None = {}) -> Event: ...
33
+ type: str
34
+ target: EventTarget | None
35
+ srcElement: EventTarget | None
36
+ currentTarget: EventTarget | None
37
+ def composedPath(self) -> Sequence[EventTarget]: ...
38
+ NONE = 0
39
+ CAPTURING_PHASE = 1
40
+ AT_TARGET = 2
41
+ BUBBLING_PHASE = 3
42
+ eventPhase: int
43
+ def stopPropagation(self) -> None: ...
44
+ cancelBubble: bool
45
+ def stopImmediatePropagation(self) -> None: ...
46
+ bubbles: bool
47
+ cancelable: bool
48
+ returnValue: bool
49
+ def preventDefault(self) -> None: ...
50
+ defaultPrevented: bool
51
+ composed: bool
52
+ isTrusted: bool
53
+ timeStamp: DOMHighResTimeStamp
54
+ def initEvent(self, type: str, bubbles: bool | None = False, cancelable: bool | None = False) -> None: ...
55
+
56
+ class UIEvent(Event):
57
+ @classmethod
58
+ def new(self, type: str, eventInitDict: UIEventInit | None = {}) -> UIEvent: ...
59
+ sourceCapabilities: InputDeviceCapabilities | None
60
+ view: Window | None
61
+ detail: int
62
+ def initUIEvent(self, typeArg: str, bubblesArg: bool | None = False, cancelableArg: bool | None = False, viewArg: Window | None = None, detailArg: int | None = 0) -> None: ...
63
+ which: int
64
+
65
+ class MouseEvent(UIEvent):
66
+ @classmethod
67
+ def new(self, type: str, eventInitDict: MouseEventInit | None = {}) -> MouseEvent: ...
68
+ pageX: float
69
+ pageY: float
70
+ x: float
71
+ y: float
72
+ offsetX: float
73
+ offsetY: float
74
+ movementX: float
75
+ movementY: float
76
+ screenX: int
77
+ screenY: int
78
+ clientX: int
79
+ clientY: int
80
+ ctrlKey: bool
81
+ shiftKey: bool
82
+ altKey: bool
83
+ metaKey: bool
84
+ button: short
85
+ buttons: int
86
+ relatedTarget: EventTarget | None
87
+ def getModifierState(self, keyArg: str) -> bool: ...
88
+ def initMouseEvent(self, typeArg: str, bubblesArg: bool | None = False, cancelableArg: bool | None = False, viewArg: Window | None = None, detailArg: int | None = 0, screenXArg: int | None = 0, screenYArg: int | None = 0, clientXArg: int | None = 0, clientYArg: int | None = 0, ctrlKeyArg: bool | None = False, altKeyArg: bool | None = False, shiftKeyArg: bool | None = False, metaKeyArg: bool | None = False, buttonArg: short | None = 0, relatedTargetArg: EventTarget | None = None) -> None: ...
89
+
90
+ class KeyboardEvent(UIEvent):
91
+ @classmethod
92
+ def new(self, type: str, eventInitDict: KeyboardEventInit | None = {}) -> KeyboardEvent: ...
93
+ DOM_KEY_LOCATION_STANDARD = 0x00
94
+ DOM_KEY_LOCATION_LEFT = 0x01
95
+ DOM_KEY_LOCATION_RIGHT = 0x02
96
+ DOM_KEY_LOCATION_NUMPAD = 0x03
97
+ key: str
98
+ code: str
99
+ location: int
100
+ ctrlKey: bool
101
+ shiftKey: bool
102
+ altKey: bool
103
+ metaKey: bool
104
+ repeat: bool
105
+ isComposing: bool
106
+ def getModifierState(self, keyArg: str) -> bool: ...
107
+ def initKeyboardEvent(self, typeArg: str, bubblesArg: bool | None = False, cancelableArg: bool | None = False, viewArg: Window | None = None, keyArg: str | None = "", locationArg: int | None = 0, ctrlKey: bool | None = False, altKey: bool | None = False, shiftKey: bool | None = False, metaKey: bool | None = False) -> None: ...
108
+ charCode: int
109
+ keyCode: int
110
+
111
+ class FocusEvent(UIEvent):
112
+ @classmethod
113
+ def new(self, type: str, eventInitDict: FocusEventInit | None = {}) -> FocusEvent: ...
114
+ relatedTarget: EventTarget | None
115
+
116
+ class InputEvent(UIEvent):
117
+ @classmethod
118
+ def new(self, type: str, eventInitDict: InputEventInit | None = {}) -> InputEvent: ...
119
+ dataTransfer: DataTransfer | None
120
+ def getTargetRanges(self) -> Sequence[StaticRange]: ...
121
+ data: str | None
122
+ isComposing: bool
123
+ inputType: str
124
+
125
+ class WheelEvent(MouseEvent):
126
+ @classmethod
127
+ def new(self, type: str, eventInitDict: WheelEventInit | None = {}) -> WheelEvent: ...
128
+ DOM_DELTA_PIXEL = 0x00
129
+ DOM_DELTA_LINE = 0x01
130
+ DOM_DELTA_PAGE = 0x02
131
+ deltaX: float
132
+ deltaY: float
133
+ deltaZ: float
134
+ deltaMode: int
135
+
136
+ class TouchEvent(UIEvent):
137
+ @classmethod
138
+ def new(self, type: str, eventInitDict: TouchEventInit | None = {}) -> TouchEvent: ...
139
+ touches: TouchList
140
+ targetTouches: TouchList
141
+ changedTouches: TouchList
142
+ altKey: bool
143
+ metaKey: bool
144
+ ctrlKey: bool
145
+ shiftKey: bool
146
+
147
+ class Touch:
148
+ @classmethod
149
+ def new(self, touchInitDict: TouchInit) -> Touch: ...
150
+ identifier: int
151
+ target: EventTarget
152
+ screenX: float
153
+ screenY: float
154
+ clientX: float
155
+ clientY: float
156
+ pageX: float
157
+ pageY: float
158
+ radiusX: float
159
+ radiusY: float
160
+ rotationAngle: float
161
+ force: float
162
+ altitudeAngle: float
163
+ azimuthAngle: float
164
+ touchType: TouchType
165
+
166
+ class TouchList:
167
+ length: int
168
+
169
+ class PointerEvent(MouseEvent):
170
+ @classmethod
171
+ def new(self, type: str, eventInitDict: PointerEventInit | None = {}) -> PointerEvent: ...
172
+ pointerId: int
173
+ width: float
174
+ height: float
175
+ pressure: float
176
+ tangentialPressure: float
177
+ tiltX: int
178
+ tiltY: int
179
+ twist: int
180
+ altitudeAngle: float
181
+ azimuthAngle: float
182
+ pointerType: str
183
+ isPrimary: bool
184
+ def getCoalescedEvents(self) -> Sequence[PointerEvent]: ...
185
+ def getPredictedEvents(self) -> Sequence[PointerEvent]: ...
186
+
187
+ class DragEvent(MouseEvent):
188
+ @classmethod
189
+ def new(self, type: str, eventInitDict: DragEventInit | None = {}) -> DragEvent: ...
190
+ dataTransfer: DataTransfer | None
191
+
192
+ class ClipboardEvent(Event):
193
+ @classmethod
194
+ def new(self, type: str, eventInitDict: ClipboardEventInit | None = {}) -> ClipboardEvent: ...
195
+ clipboardData: DataTransfer | None
196
+
197
+ class AnimationEvent(Event):
198
+ @classmethod
199
+ def new(self, type: CSSOMString, animationEventInitDict: AnimationEventInit | None = {}) -> AnimationEvent: ...
200
+ animationName: CSSOMString
201
+ elapsedTime: float
202
+ pseudoElement: CSSOMString
203
+
204
+ class TransitionEvent(Event):
205
+ @classmethod
206
+ def new(self, type: CSSOMString, transitionEventInitDict: TransitionEventInit | None = {}) -> TransitionEvent: ...
207
+ propertyName: CSSOMString
208
+ elapsedTime: float
209
+ pseudoElement: CSSOMString
210
+
211
+ class CustomEvent(Event):
212
+ @classmethod
213
+ def new(self, type: str, eventInitDict: CustomEventInit | None = {}) -> CustomEvent: ...
214
+ detail: Any
215
+ def initCustomEvent(self, type: str, bubbles: bool | None = False, cancelable: bool | None = False, detail: Any | None = None) -> None: ...
216
+
217
+ class ErrorEvent(Event):
218
+ @classmethod
219
+ def new(self, type: str, eventInitDict: ErrorEventInit | None = {}) -> ErrorEvent: ...
220
+ message: str
221
+ filename: USVString
222
+ lineno: int
223
+ colno: int
224
+ error: Any
225
+
226
+ class ProgressEvent(Event):
227
+ @classmethod
228
+ def new(self, type: str, eventInitDict: ProgressEventInit | None = {}) -> ProgressEvent: ...
229
+ lengthComputable: bool
230
+ loaded: int
231
+ total: int
232
+
233
+ class SubmitEvent(Event):
234
+ @classmethod
235
+ def new(self, type: str, eventInitDict: SubmitEventInit | None = {}) -> SubmitEvent: ...
236
+ submitter: HTMLElement | None
237
+
238
+ class FormDataEvent(Event):
239
+ @classmethod
240
+ def new(self, type: str, eventInitDict: FormDataEventInit) -> FormDataEvent: ...
241
+ formData: FormData
242
+
243
+ class HashChangeEvent(Event):
244
+ @classmethod
245
+ def new(self, type: str, eventInitDict: HashChangeEventInit | None = {}) -> HashChangeEvent: ...
246
+ oldURL: USVString
247
+ newURL: USVString
248
+
249
+ class PopStateEvent(Event):
250
+ @classmethod
251
+ def new(self, type: str, eventInitDict: PopStateEventInit | None = {}) -> PopStateEvent: ...
252
+ state: Any
253
+
254
+ class StorageEvent(Event):
255
+ @classmethod
256
+ def new(self, type: str, eventInitDict: StorageEventInit | None = {}) -> StorageEvent: ...
257
+ key: str | None
258
+ oldValue: str | None
259
+ newValue: str | None
260
+ url: USVString
261
+ storageArea: Storage | None
262
+ def initStorageEvent(self, type: str, bubbles: bool | None = False, cancelable: bool | None = False, key: str | None = None, oldValue: str | None = None, newValue: str | None = None, url: USVString | None = "", storageArea: Storage | None = None) -> None: ...
263
+
264
+ class MessageEvent(Event):
265
+ @classmethod
266
+ def new(self, type: str, eventInitDict: MessageEventInit | None = {}) -> MessageEvent: ...
267
+ data: Any
268
+ origin: USVString
269
+ lastEventId: str
270
+ source: MessageEventSource | None
271
+ ports: Sequence[MessagePort]
272
+ def initMessageEvent(self, type: str, bubbles: bool | None = False, cancelable: bool | None = False, data: Any | None = None, origin: USVString | None = "", lastEventId: str | None = "", source: MessageEventSource | None = None, ports: Sequence[MessagePort] | None = []) -> None: ...
273
+
274
+ class BeforeUnloadEvent(Event):
275
+ returnValue: str
276
+
277
+ class Node(EventTarget):
278
+ ELEMENT_NODE = 1
279
+ ATTRIBUTE_NODE = 2
280
+ TEXT_NODE = 3
281
+ CDATA_SECTION_NODE = 4
282
+ ENTITY_REFERENCE_NODE = 5
283
+ ENTITY_NODE = 6
284
+ PROCESSING_INSTRUCTION_NODE = 7
285
+ COMMENT_NODE = 8
286
+ DOCUMENT_NODE = 9
287
+ DOCUMENT_TYPE_NODE = 10
288
+ DOCUMENT_FRAGMENT_NODE = 11
289
+ NOTATION_NODE = 12
290
+ nodeType: int
291
+ nodeName: str
292
+ baseURI: USVString
293
+ isConnected: bool
294
+ ownerDocument: Document | None
295
+ def getRootNode(self, options: GetRootNodeOptions | None = {}) -> Node: ...
296
+ parentNode: Node | None
297
+ parentElement: Element | None
298
+ def hasChildNodes(self) -> bool: ...
299
+ childNodes: NodeList
300
+ firstChild: Node | None
301
+ lastChild: Node | None
302
+ previousSibling: Node | None
303
+ nextSibling: Node | None
304
+ nodeValue: str | None
305
+ textContent: str | None
306
+ def normalize(self) -> None: ...
307
+ def cloneNode(self, deep: bool | None = False) -> Node: ...
308
+ def isEqualNode(self, otherNode: Node | None) -> bool: ...
309
+ def isSameNode(self, otherNode: Node | None) -> bool: ...
310
+ DOCUMENT_POSITION_DISCONNECTED = 0x01
311
+ DOCUMENT_POSITION_PRECEDING = 0x02
312
+ DOCUMENT_POSITION_FOLLOWING = 0x04
313
+ DOCUMENT_POSITION_CONTAINS = 0x08
314
+ DOCUMENT_POSITION_CONTAINED_BY = 0x10
315
+ DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC = 0x20
316
+ def compareDocumentPosition(self, other: Node) -> int: ...
317
+ def contains(self, other: Node | None) -> bool: ...
318
+ def lookupPrefix(self, namespace: str | None) -> str | None: ...
319
+ def lookupNamespaceURI(self, prefix: str | None) -> str | None: ...
320
+ def isDefaultNamespace(self, namespace: str | None) -> bool: ...
321
+ def insertBefore(self, node: Node, child: Node | None) -> Node: ...
322
+ def appendChild(self, node: Node) -> Node: ...
323
+ def replaceChild(self, node: Node, child: Node) -> Node: ...
324
+ def removeChild(self, child: Node) -> Node: ...
325
+
326
+ class NodeList:
327
+ length: int
328
+
329
+ class Element(Node, InnerHTML, Region, GeometryUtils, ParentNode, NonDocumentTypeChildNode, ChildNode, Slottable, ARIAMixin, Animatable):
330
+ outerHTML: str
331
+ def insertAdjacentHTML(self, position: str, text: str) -> None: ...
332
+ def getSpatialNavigationContainer(self) -> Node: ...
333
+ def focusableAreas(self, option: FocusableAreasOption | None = {}) -> Sequence[Node]: ...
334
+ def spatialNavigationSearch(self, dir: SpatialNavigationDirection, options: SpatialNavigationSearchOptions | None = {}) -> Node | None: ...
335
+ def pseudo(self, type: CSSOMString) -> CSSPseudoElement | None: ...
336
+ part: DOMTokenList
337
+ def computedStyleMap(self) -> StylePropertyMapReadOnly: ...
338
+ def getClientRects(self) -> DOMRectList: ...
339
+ def getBoundingClientRect(self) -> DOMRect: ...
340
+ def checkVisibility(self, options: CheckVisibilityOptions | None = {}) -> bool: ...
341
+ def scrollIntoView(self, arg: bool | ScrollIntoViewOptions | None = {}) -> None: ...
342
+ @overload
343
+ def scroll(self, options: ScrollToOptions | None = {}) -> None: ...
344
+ @overload
345
+ def scroll(self, x: float, y: float) -> None: ...
346
+ @overload
347
+ def scrollTo(self, options: ScrollToOptions | None = {}) -> None: ...
348
+ @overload
349
+ def scrollTo(self, x: float, y: float) -> None: ...
350
+ @overload
351
+ def scrollBy(self, options: ScrollToOptions | None = {}) -> None: ...
352
+ @overload
353
+ def scrollBy(self, x: float, y: float) -> None: ...
354
+ scrollTop: float
355
+ scrollLeft: float
356
+ scrollWidth: int
357
+ scrollHeight: int
358
+ clientTop: int
359
+ clientLeft: int
360
+ clientWidth: int
361
+ clientHeight: int
362
+ namespaceURI: str | None
363
+ prefix: str | None
364
+ localName: str
365
+ tagName: str
366
+ id: str
367
+ className: str
368
+ classList: DOMTokenList
369
+ slot: str
370
+ def hasAttributes(self) -> bool: ...
371
+ attributes: NamedNodeMap
372
+ def getAttributeNames(self) -> Sequence[str]: ...
373
+ def getAttribute(self, qualifiedName: str) -> str | None: ...
374
+ def getAttributeNS(self, namespace: str | None, localName: str) -> str | None: ...
375
+ def setAttribute(self, qualifiedName: str, value: str) -> None: ...
376
+ def setAttributeNS(self, namespace: str | None, qualifiedName: str, value: str) -> None: ...
377
+ def removeAttribute(self, qualifiedName: str) -> None: ...
378
+ def removeAttributeNS(self, namespace: str | None, localName: str) -> None: ...
379
+ def toggleAttribute(self, qualifiedName: str, force: bool | None = None) -> bool: ...
380
+ def hasAttribute(self, qualifiedName: str) -> bool: ...
381
+ def hasAttributeNS(self, namespace: str | None, localName: str) -> bool: ...
382
+ def getAttributeNode(self, qualifiedName: str) -> Attr | None: ...
383
+ def getAttributeNodeNS(self, namespace: str | None, localName: str) -> Attr | None: ...
384
+ def setAttributeNode(self, attr: Attr) -> Attr | None: ...
385
+ def setAttributeNodeNS(self, attr: Attr) -> Attr | None: ...
386
+ def removeAttributeNode(self, attr: Attr) -> Attr: ...
387
+ def attachShadow(self, init: ShadowRootInit) -> ShadowRoot: ...
388
+ shadowRoot: ShadowRoot | None
389
+ def closest(self, selectors: str) -> Element | None: ...
390
+ def matches(self, selectors: str) -> bool: ...
391
+ def webkitMatchesSelector(self, selectors: str) -> bool: ...
392
+ def getElementsByTagName(self, qualifiedName: str) -> HTMLCollection: ...
393
+ def getElementsByTagNameNS(self, namespace: str | None, localName: str) -> HTMLCollection: ...
394
+ def getElementsByClassName(self, classNames: str) -> HTMLCollection: ...
395
+ def insertAdjacentElement(self, where: str, element: Element) -> Element | None: ...
396
+ def insertAdjacentText(self, where: str, data: str) -> None: ...
397
+ editContext: EditContext | None
398
+ elementTiming: str
399
+ def requestFullscreen(self, options: FullscreenOptions | None = {}) -> Awaitable[None]: ...
400
+ onfullscreenchange: EventHandler
401
+ onfullscreenerror: EventHandler
402
+ def setPointerCapture(self, pointerId: int) -> None: ...
403
+ def releasePointerCapture(self, pointerId: int) -> None: ...
404
+ def hasPointerCapture(self, pointerId: int) -> bool: ...
405
+ def requestPointerLock(self) -> None: ...
406
+ def setHTML(self, input: str, options: SetHTMLOptions | None = {}) -> None: ...
407
+
408
+ class HTMLCollection:
409
+ length: int
410
+
411
+ class DOMTokenList:
412
+ length: int
413
+ def contains(self, token: str) -> bool: ...
414
+ def add(self, *tokens: str) -> None: ...
415
+ def remove(self, *tokens: str) -> None: ...
416
+ def toggle(self, token: str, force: bool | None = None) -> bool: ...
417
+ def replace(self, token: str, newToken: str) -> bool: ...
418
+ def supports(self, token: str) -> bool: ...
419
+ value: str
420
+
421
+ class DOMRect(DOMRectReadOnly):
422
+ @classmethod
423
+ def new(self, x: float | None = 0, y: float | None = 0, width: float | None = 0, height: float | None = 0) -> DOMRect: ...
424
+ x: float
425
+ y: float
426
+ width: float
427
+ height: float
428
+
429
+ class DOMRectReadOnly:
430
+ @classmethod
431
+ def new(self, x: float | None = 0, y: float | None = 0, width: float | None = 0, height: float | None = 0) -> DOMRectReadOnly: ...
432
+ x: float
433
+ y: float
434
+ width: float
435
+ height: float
436
+ top: float
437
+ right: float
438
+ bottom: float
439
+ left: float
440
+ def toJSON(self) -> object: ...
441
+
442
+ class InnerHTML:
443
+ innerHTML: str
444
+
445
+ class Region:
446
+ regionOverset: CSSOMString
447
+ def getRegionFlowRanges(self) -> Sequence[Range]: ...
448
+
449
+ class GeometryUtils:
450
+ def getBoxQuads(self, options: BoxQuadOptions | None = {}) -> Sequence[DOMQuad]: ...
451
+ def convertQuadFromNode(self, quad: DOMQuadInit, from_: GeometryNode, options: ConvertCoordinateOptions | None = {}) -> DOMQuad: ...
452
+ def convertRectFromNode(self, rect: DOMRectReadOnly, from_: GeometryNode, options: ConvertCoordinateOptions | None = {}) -> DOMQuad: ...
453
+ def convertPointFromNode(self, point: DOMPointInit, from_: GeometryNode, options: ConvertCoordinateOptions | None = {}) -> DOMPoint: ...
454
+
455
+ class NonDocumentTypeChildNode:
456
+ previousElementSibling: Element | None
457
+ nextElementSibling: Element | None
458
+
459
+ class ARIAMixin:
460
+ role: str | None
461
+ ariaActiveDescendantElement: Element | None
462
+ ariaAtomic: str | None
463
+ ariaAutoComplete: str | None
464
+ ariaBusy: str | None
465
+ ariaChecked: str | None
466
+ ariaColCount: str | None
467
+ ariaColIndex: str | None
468
+ ariaColIndexText: str | None
469
+ ariaColSpan: str | None
470
+ ariaControlsElements: Sequence[Element]
471
+ ariaCurrent: str | None
472
+ ariaDescribedByElements: Sequence[Element]
473
+ ariaDescription: str | None
474
+ ariaDetailsElements: Sequence[Element]
475
+ ariaDisabled: str | None
476
+ ariaErrorMessageElements: Sequence[Element]
477
+ ariaExpanded: str | None
478
+ ariaFlowToElements: Sequence[Element]
479
+ ariaHasPopup: str | None
480
+ ariaHidden: str | None
481
+ ariaInvalid: str | None
482
+ ariaKeyShortcuts: str | None
483
+ ariaLabel: str | None
484
+ ariaLabelledByElements: Sequence[Element]
485
+ ariaLevel: str | None
486
+ ariaLive: str | None
487
+ ariaModal: str | None
488
+ ariaMultiLine: str | None
489
+ ariaMultiSelectable: str | None
490
+ ariaOrientation: str | None
491
+ ariaOwnsElements: Sequence[Element]
492
+ ariaPlaceholder: str | None
493
+ ariaPosInSet: str | None
494
+ ariaPressed: str | None
495
+ ariaReadOnly: str | None
496
+ ariaRequired: str | None
497
+ ariaRoleDescription: str | None
498
+ ariaRowCount: str | None
499
+ ariaRowIndex: str | None
500
+ ariaRowIndexText: str | None
501
+ ariaRowSpan: str | None
502
+ ariaSelected: str | None
503
+ ariaSetSize: str | None
504
+ ariaSort: str | None
505
+ ariaValueMax: str | None
506
+ ariaValueMin: str | None
507
+ ariaValueNow: str | None
508
+ ariaValueText: str | None
509
+
510
+ class Animatable:
511
+ def animate(self, keyframes: object | None, options: float | KeyframeAnimationOptions | None = {}) -> Animation: ...
512
+ def getAnimations(self, options: GetAnimationsOptions | None = {}) -> Sequence[Animation]: ...
513
+
514
+ class ElementCSSInlineStyle:
515
+ attributeStyleMap: StylePropertyMap
516
+ style: CSSStyleDeclaration
517
+
518
+ class ElementContentEditable:
519
+ contentEditable: str
520
+ enterKeyHint: str
521
+ isContentEditable: bool
522
+ inputMode: str
523
+ virtualKeyboardPolicy: str
524
+
525
+ class HTMLOrSVGElement:
526
+ dataset: DOMStringMap
527
+ nonce: str
528
+ autofocus: bool
529
+ tabIndex: int
530
+ def focus(self, options: FocusOptions | None = {}) -> None: ...
531
+ def blur(self) -> None: ...
532
+
533
+ class NonElementParentNode:
534
+ def getElementById(self, elementId: str) -> Element | None: ...
535
+
536
+ class ParentNode:
537
+ children: HTMLCollection
538
+ firstElementChild: Element | None
539
+ lastElementChild: Element | None
540
+ childElementCount: int
541
+ def prepend(self, *nodes: Node | str) -> None: ...
542
+ def append(self, *nodes: Node | str) -> None: ...
543
+ def replaceChildren(self, *nodes: Node | str) -> None: ...
544
+ def querySelector(self, selectors: str) -> Element | None: ...
545
+ def querySelectorAll(self, selectors: str) -> NodeList: ...
546
+
547
+ class ChildNode:
548
+ def before(self, *nodes: Node | str) -> None: ...
549
+ def after(self, *nodes: Node | str) -> None: ...
550
+ def replaceWith(self, *nodes: Node | str) -> None: ...
551
+ def remove(self) -> None: ...
552
+
553
+ class Slottable:
554
+ assignedSlot: HTMLSlotElement | None
555
+
556
+ class DocumentOrShadowRoot:
557
+ styleSheets: StyleSheetList
558
+ adoptedStyleSheets: Sequence[CSSStyleSheet]
559
+ fullscreenElement: Element | None
560
+ activeElement: Element | None
561
+ pictureInPictureElement: Element | None
562
+ pointerLockElement: Element | None
563
+ def getAnimations(self) -> Sequence[Animation]: ...
564
+
565
+ class GlobalEventHandlers:
566
+ onanimationstart: EventHandler
567
+ onanimationiteration: EventHandler
568
+ onanimationend: EventHandler
569
+ onanimationcancel: EventHandler
570
+ ontransitionrun: EventHandler
571
+ ontransitionstart: EventHandler
572
+ ontransitionend: EventHandler
573
+ ontransitioncancel: EventHandler
574
+ onabort: EventHandler
575
+ onauxclick: EventHandler
576
+ onbeforeinput: EventHandler
577
+ onbeforematch: EventHandler
578
+ onblur: EventHandler
579
+ oncancel: EventHandler
580
+ oncanplay: EventHandler
581
+ oncanplaythrough: EventHandler
582
+ onchange: EventHandler
583
+ onclick: EventHandler
584
+ onclose: EventHandler
585
+ oncontextlost: EventHandler
586
+ oncontextmenu: EventHandler
587
+ oncontextrestored: EventHandler
588
+ oncopy: EventHandler
589
+ oncuechange: EventHandler
590
+ oncut: EventHandler
591
+ ondblclick: EventHandler
592
+ ondrag: EventHandler
593
+ ondragend: EventHandler
594
+ ondragenter: EventHandler
595
+ ondragleave: EventHandler
596
+ ondragover: EventHandler
597
+ ondragstart: EventHandler
598
+ ondrop: EventHandler
599
+ ondurationchange: EventHandler
600
+ onemptied: EventHandler
601
+ onended: EventHandler
602
+ onerror: OnErrorEventHandler
603
+ onfocus: EventHandler
604
+ onformdata: EventHandler
605
+ oninput: EventHandler
606
+ oninvalid: EventHandler
607
+ onkeydown: EventHandler
608
+ onkeypress: EventHandler
609
+ onkeyup: EventHandler
610
+ onload: EventHandler
611
+ onloadeddata: EventHandler
612
+ onloadedmetadata: EventHandler
613
+ onloadstart: EventHandler
614
+ onmousedown: EventHandler
615
+ onmouseenter: EventHandler
616
+ onmouseleave: EventHandler
617
+ onmousemove: EventHandler
618
+ onmouseout: EventHandler
619
+ onmouseover: EventHandler
620
+ onmouseup: EventHandler
621
+ onpaste: EventHandler
622
+ onpause: EventHandler
623
+ onplay: EventHandler
624
+ onplaying: EventHandler
625
+ onprogress: EventHandler
626
+ onratechange: EventHandler
627
+ onreset: EventHandler
628
+ onresize: EventHandler
629
+ onscroll: EventHandler
630
+ onscrollend: EventHandler
631
+ onsecuritypolicyviolation: EventHandler
632
+ onseeked: EventHandler
633
+ onseeking: EventHandler
634
+ onselect: EventHandler
635
+ onslotchange: EventHandler
636
+ onstalled: EventHandler
637
+ onsubmit: EventHandler
638
+ onsuspend: EventHandler
639
+ ontimeupdate: EventHandler
640
+ ontoggle: EventHandler
641
+ onvolumechange: EventHandler
642
+ onwaiting: EventHandler
643
+ onwebkitanimationend: EventHandler
644
+ onwebkitanimationiteration: EventHandler
645
+ onwebkitanimationstart: EventHandler
646
+ onwebkittransitionend: EventHandler
647
+ onwheel: EventHandler
648
+ onpointerover: EventHandler
649
+ onpointerenter: EventHandler
650
+ onpointerdown: EventHandler
651
+ onpointermove: EventHandler
652
+ onpointerrawupdate: EventHandler
653
+ onpointerup: EventHandler
654
+ onpointercancel: EventHandler
655
+ onpointerout: EventHandler
656
+ onpointerleave: EventHandler
657
+ ongotpointercapture: EventHandler
658
+ onlostpointercapture: EventHandler
659
+ onselectstart: EventHandler
660
+ onselectionchange: EventHandler
661
+ ontouchstart: EventHandler
662
+ ontouchend: EventHandler
663
+ ontouchmove: EventHandler
664
+ ontouchcancel: EventHandler
665
+ onbeforexrselect: EventHandler
666
+
667
+ class FontFaceSource:
668
+ fonts: FontFaceSet
669
+
670
+ class XPathEvaluatorBase:
671
+ def createExpression(self, expression: str, resolver: XPathNSResolver | None = None) -> XPathExpression: ...
672
+ def createNSResolver(self, nodeResolver: Node) -> XPathNSResolver: ...
673
+ def evaluate(self, expression: str, contextNode: Node, resolver: XPathNSResolver | None = None, type: int | None = 0, result: XPathResult | None = None) -> XPathResult: ...
674
+
675
+ class Document(Node, FontFaceSource, GeometryUtils, NonElementParentNode, DocumentOrShadowRoot, ParentNode, XPathEvaluatorBase, GlobalEventHandlers):
676
+ @classmethod
677
+ def new(self) -> Document: ...
678
+ rootElement: SVGSVGElement | None
679
+ namedFlows: NamedFlowMap
680
+ def startViewTransition(self, callback: UpdateCallback | None = None) -> ViewTransition: ...
681
+ def elementFromPoint(self, x: float, y: float) -> Element | None: ...
682
+ def elementsFromPoint(self, x: float, y: float) -> Sequence[Element]: ...
683
+ def caretPositionFromPoint(self, x: float, y: float) -> CaretPosition | None: ...
684
+ scrollingElement: Element | None
685
+ implementation: DOMImplementation
686
+ URL: USVString
687
+ documentURI: USVString
688
+ compatMode: str
689
+ characterSet: str
690
+ charset: str
691
+ inputEncoding: str
692
+ contentType: str
693
+ doctype: DocumentType | None
694
+ documentElement: Element | None
695
+ def getElementsByTagName(self, qualifiedName: str) -> HTMLCollection: ...
696
+ def getElementsByTagNameNS(self, namespace: str | None, localName: str) -> HTMLCollection: ...
697
+ def getElementsByClassName(self, classNames: str) -> HTMLCollection: ...
698
+ def createElement(self, localName: str, options: str | ElementCreationOptions | None = {}) -> Element: ...
699
+ def createElementNS(self, namespace: str | None, qualifiedName: str, options: str | ElementCreationOptions | None = {}) -> Element: ...
700
+ def createDocumentFragment(self) -> DocumentFragment: ...
701
+ def createTextNode(self, data: str) -> Text: ...
702
+ def createCDATASection(self, data: str) -> CDATASection: ...
703
+ def createComment(self, data: str) -> Comment: ...
704
+ def createProcessingInstruction(self, target: str, data: str) -> ProcessingInstruction: ...
705
+ def importNode(self, node: Node, deep: bool | None = False) -> Node: ...
706
+ def adoptNode(self, node: Node) -> Node: ...
707
+ def createAttribute(self, localName: str) -> Attr: ...
708
+ def createAttributeNS(self, namespace: str | None, qualifiedName: str) -> Attr: ...
709
+ def createEvent(self, interface: str) -> Event: ...
710
+ def createRange(self) -> Range: ...
711
+ def createNodeIterator(self, root: Node, whatToShow: int | None = 0xFFFFFFFF, filter: NodeFilter | None = None) -> NodeIterator: ...
712
+ def createTreeWalker(self, root: Node, whatToShow: int | None = 0xFFFFFFFF, filter: NodeFilter | None = None) -> TreeWalker: ...
713
+ def measureElement(self, element: Element) -> FontMetrics: ...
714
+ def measureText(self, text: str, styleMap: StylePropertyMapReadOnly) -> FontMetrics: ...
715
+ fullscreenEnabled: bool
716
+ fullscreen: bool
717
+ def exitFullscreen(self) -> Awaitable[None]: ...
718
+ onfullscreenchange: EventHandler
719
+ onfullscreenerror: EventHandler
720
+ location: Location | None
721
+ domain: USVString
722
+ referrer: USVString
723
+ cookie: USVString
724
+ lastModified: str
725
+ readyState: DocumentReadyState
726
+ title: str
727
+ dir: str
728
+ body: HTMLElement | None
729
+ head: HTMLHeadElement | None
730
+ images: HTMLCollection
731
+ embeds: HTMLCollection
732
+ plugins: HTMLCollection
733
+ links: HTMLCollection
734
+ forms: HTMLCollection
735
+ scripts: HTMLCollection
736
+ def getElementsByName(self, elementName: str) -> NodeList: ...
737
+ currentScript: HTMLOrSVGScriptElement | None
738
+ @overload
739
+ def open(self, unused1: str | None = None, unused2: str | None = None) -> Document: ...
740
+ @overload
741
+ def open(self, url: USVString, name: str, features: str) -> WindowProxy | None: ...
742
+ def close(self) -> None: ...
743
+ def write(self, *text: str) -> None: ...
744
+ def writeln(self, *text: str) -> None: ...
745
+ defaultView: WindowProxy | None
746
+ def hasFocus(self) -> bool: ...
747
+ designMode: str
748
+ def execCommand(self, commandId: str, showUI: bool | None = False, value: str | None = "") -> bool: ...
749
+ def queryCommandEnabled(self, commandId: str) -> bool: ...
750
+ def queryCommandIndeterm(self, commandId: str) -> bool: ...
751
+ def queryCommandState(self, commandId: str) -> bool: ...
752
+ def queryCommandSupported(self, commandId: str) -> bool: ...
753
+ def queryCommandValue(self, commandId: str) -> str: ...
754
+ hidden: bool
755
+ visibilityState: DocumentVisibilityState
756
+ onreadystatechange: EventHandler
757
+ onvisibilitychange: EventHandler
758
+ fgColor: str
759
+ linkColor: str
760
+ vlinkColor: str
761
+ alinkColor: str
762
+ bgColor: str
763
+ anchors: HTMLCollection
764
+ applets: HTMLCollection
765
+ def clear(self) -> None: ...
766
+ def captureEvents(self) -> None: ...
767
+ def releaseEvents(self) -> None: ...
768
+ all: HTMLAllCollection
769
+ onfreeze: EventHandler
770
+ onresume: EventHandler
771
+ wasDiscarded: bool
772
+ permissionsPolicy: PermissionsPolicy
773
+ pictureInPictureEnabled: bool
774
+ def exitPictureInPicture(self) -> Awaitable[None]: ...
775
+ onpointerlockchange: EventHandler
776
+ onpointerlockerror: EventHandler
777
+ def exitPointerLock(self) -> None: ...
778
+ prerendering: bool
779
+ onprerenderingchange: EventHandler
780
+ fragmentDirective: FragmentDirective
781
+ def getSelection(self) -> Selection | None: ...
782
+ def hasStorageAccess(self) -> Awaitable[bool]: ...
783
+ def requestStorageAccess(self) -> Awaitable[None]: ...
784
+ timeline: DocumentTimeline
785
+
786
+ class DocumentFragment(Node, NonElementParentNode, ParentNode):
787
+ @classmethod
788
+ def new(self) -> DocumentFragment: ...
789
+
790
+ class HTMLElement(Element, ElementCSSInlineStyle, GlobalEventHandlers, ElementContentEditable, HTMLOrSVGElement):
791
+ @classmethod
792
+ def new(self) -> HTMLElement: ...
793
+ offsetParent: Element | None
794
+ offsetTop: int
795
+ offsetLeft: int
796
+ offsetWidth: int
797
+ offsetHeight: int
798
+ title: str
799
+ lang: str
800
+ translate: bool
801
+ dir: str
802
+ hidden: bool | float | str | None
803
+ inert: bool
804
+ def click(self) -> None: ...
805
+ accessKey: str
806
+ accessKeyLabel: str
807
+ draggable: bool
808
+ spellcheck: bool
809
+ autocapitalize: str
810
+ innerText: str
811
+ outerText: str
812
+ def attachInternals(self) -> ElementInternals: ...
813
+
814
+ class HTMLDivElement(HTMLElement):
815
+ @classmethod
816
+ def new(self) -> HTMLDivElement: ...
817
+ align: str
818
+
819
+ class HTMLSpanElement(HTMLElement):
820
+ @classmethod
821
+ def new(self) -> HTMLSpanElement: ...
822
+
823
+ class HTMLParagraphElement(HTMLElement):
824
+ @classmethod
825
+ def new(self) -> HTMLParagraphElement: ...
826
+ align: str
827
+
828
+ class HTMLHeadingElement(HTMLElement):
829
+ @classmethod
830
+ def new(self) -> HTMLHeadingElement: ...
831
+ align: str
832
+
833
+ class HTMLBRElement(HTMLElement):
834
+ @classmethod
835
+ def new(self) -> HTMLBRElement: ...
836
+ clear: str
837
+
838
+ class HTMLHRElement(HTMLElement):
839
+ @classmethod
840
+ def new(self) -> HTMLHRElement: ...
841
+ align: str
842
+ color: str
843
+ noShade: bool
844
+ size: str
845
+ width: str
846
+
847
+ class HTMLPreElement(HTMLElement):
848
+ @classmethod
849
+ def new(self) -> HTMLPreElement: ...
850
+ width: int
851
+
852
+ class HTMLQuoteElement(HTMLElement):
853
+ @classmethod
854
+ def new(self) -> HTMLQuoteElement: ...
855
+ cite: USVString
856
+
857
+ class HTMLLabelElement(HTMLElement):
858
+ @classmethod
859
+ def new(self) -> HTMLLabelElement: ...
860
+ form: HTMLFormElement | None
861
+ htmlFor: str
862
+ control: HTMLElement | None
863
+
864
+ class HTMLLIElement(HTMLElement):
865
+ @classmethod
866
+ def new(self) -> HTMLLIElement: ...
867
+ value: int
868
+ type: str
869
+
870
+ class HTMLUListElement(HTMLElement):
871
+ @classmethod
872
+ def new(self) -> HTMLUListElement: ...
873
+ compact: bool
874
+ type: str
875
+
876
+ class HTMLOListElement(HTMLElement):
877
+ @classmethod
878
+ def new(self) -> HTMLOListElement: ...
879
+ reversed: bool
880
+ start: int
881
+ type: str
882
+ compact: bool
883
+
884
+ class HTMLTableElement(HTMLElement):
885
+ @classmethod
886
+ def new(self) -> HTMLTableElement: ...
887
+ caption: HTMLTableCaptionElement | None
888
+ def createCaption(self) -> HTMLTableCaptionElement: ...
889
+ def deleteCaption(self) -> None: ...
890
+ tHead: HTMLTableSectionElement | None
891
+ def createTHead(self) -> HTMLTableSectionElement: ...
892
+ def deleteTHead(self) -> None: ...
893
+ tFoot: HTMLTableSectionElement | None
894
+ def createTFoot(self) -> HTMLTableSectionElement: ...
895
+ def deleteTFoot(self) -> None: ...
896
+ tBodies: HTMLCollection
897
+ def createTBody(self) -> HTMLTableSectionElement: ...
898
+ rows: HTMLCollection
899
+ def insertRow(self, index: int | None = -1) -> HTMLTableRowElement: ...
900
+ def deleteRow(self, index: int) -> None: ...
901
+ align: str
902
+ border: str
903
+ frame: str
904
+ rules: str
905
+ summary: str
906
+ width: str
907
+ bgColor: str
908
+ cellPadding: str
909
+ cellSpacing: str
910
+
911
+ class HTMLTableRowElement(HTMLElement):
912
+ @classmethod
913
+ def new(self) -> HTMLTableRowElement: ...
914
+ rowIndex: int
915
+ sectionRowIndex: int
916
+ cells: HTMLCollection
917
+ def insertCell(self, index: int | None = -1) -> HTMLTableCellElement: ...
918
+ def deleteCell(self, index: int) -> None: ...
919
+ align: str
920
+ ch: str
921
+ chOff: str
922
+ vAlign: str
923
+ bgColor: str
924
+
925
+ class HTMLTableCellElement(HTMLElement):
926
+ @classmethod
927
+ def new(self) -> HTMLTableCellElement: ...
928
+ colSpan: int
929
+ rowSpan: int
930
+ headers: str
931
+ cellIndex: int
932
+ scope: str
933
+ abbr: str
934
+ align: str
935
+ axis: str
936
+ height: str
937
+ width: str
938
+ ch: str
939
+ chOff: str
940
+ noWrap: bool
941
+ vAlign: str
942
+ bgColor: str
943
+
944
+ class HTMLTableSectionElement(HTMLElement):
945
+ @classmethod
946
+ def new(self) -> HTMLTableSectionElement: ...
947
+ rows: HTMLCollection
948
+ def insertRow(self, index: int | None = -1) -> HTMLTableRowElement: ...
949
+ def deleteRow(self, index: int) -> None: ...
950
+ align: str
951
+ ch: str
952
+ chOff: str
953
+ vAlign: str
954
+
955
+ class HTMLFormElement(HTMLElement):
956
+ @classmethod
957
+ def new(self) -> HTMLFormElement: ...
958
+ acceptCharset: str
959
+ action: USVString
960
+ autocomplete: str
961
+ enctype: str
962
+ encoding: str
963
+ method: str
964
+ name: str
965
+ noValidate: bool
966
+ target: str
967
+ rel: str
968
+ relList: DOMTokenList
969
+ elements: HTMLFormControlsCollection
970
+ length: int
971
+ def submit(self) -> None: ...
972
+ def requestSubmit(self, submitter: HTMLElement | None = None) -> None: ...
973
+ def reset(self) -> None: ...
974
+ def checkValidity(self) -> bool: ...
975
+ def reportValidity(self) -> bool: ...
976
+
977
+ class HTMLInputElement(HTMLElement):
978
+ @classmethod
979
+ def new(self) -> HTMLInputElement: ...
980
+ webkitdirectory: bool
981
+ webkitEntries: Sequence[FileSystemEntry]
982
+ capture: str
983
+ accept: str
984
+ alt: str
985
+ autocomplete: str
986
+ defaultChecked: bool
987
+ checked: bool
988
+ dirName: str
989
+ disabled: bool
990
+ form: HTMLFormElement | None
991
+ files: FileList | None
992
+ formAction: USVString
993
+ formEnctype: str
994
+ formMethod: str
995
+ formNoValidate: bool
996
+ formTarget: str
997
+ height: int
998
+ indeterminate: bool
999
+ list: HTMLDataListElement | None
1000
+ max: str
1001
+ maxLength: int
1002
+ min: str
1003
+ minLength: int
1004
+ multiple: bool
1005
+ name: str
1006
+ pattern: str
1007
+ placeholder: str
1008
+ readOnly: bool
1009
+ required: bool
1010
+ size: int
1011
+ src: USVString
1012
+ step: str
1013
+ type: str
1014
+ defaultValue: str
1015
+ value: str
1016
+ valueAsDate: object | None
1017
+ valueAsNumber: float
1018
+ width: int
1019
+ def stepUp(self, n: int | None = 1) -> None: ...
1020
+ def stepDown(self, n: int | None = 1) -> None: ...
1021
+ willValidate: bool
1022
+ validity: ValidityState
1023
+ validationMessage: str
1024
+ def checkValidity(self) -> bool: ...
1025
+ def reportValidity(self) -> bool: ...
1026
+ def setCustomValidity(self, error: str) -> None: ...
1027
+ labels: NodeList | None
1028
+ def select(self) -> None: ...
1029
+ selectionStart: int | None
1030
+ selectionEnd: int | None
1031
+ selectionDirection: str | None
1032
+ @overload
1033
+ def setRangeText(self, replacement: str) -> None: ...
1034
+ @overload
1035
+ def setRangeText(self, replacement: str, start: int, end: int, selectionMode: SelectionMode | None = "preserve") -> None: ...
1036
+ def setSelectionRange(self, start: int, end: int, direction: str | None = None) -> None: ...
1037
+ def showPicker(self) -> None: ...
1038
+ align: str
1039
+ useMap: str
1040
+
1041
+ class HTMLTextAreaElement(HTMLElement):
1042
+ @classmethod
1043
+ def new(self) -> HTMLTextAreaElement: ...
1044
+ autocomplete: str
1045
+ cols: int
1046
+ dirName: str
1047
+ disabled: bool
1048
+ form: HTMLFormElement | None
1049
+ maxLength: int
1050
+ minLength: int
1051
+ name: str
1052
+ placeholder: str
1053
+ readOnly: bool
1054
+ required: bool
1055
+ rows: int
1056
+ wrap: str
1057
+ type: str
1058
+ defaultValue: str
1059
+ value: str
1060
+ textLength: int
1061
+ willValidate: bool
1062
+ validity: ValidityState
1063
+ validationMessage: str
1064
+ def checkValidity(self) -> bool: ...
1065
+ def reportValidity(self) -> bool: ...
1066
+ def setCustomValidity(self, error: str) -> None: ...
1067
+ labels: NodeList
1068
+ def select(self) -> None: ...
1069
+ selectionStart: int
1070
+ selectionEnd: int
1071
+ selectionDirection: str
1072
+ @overload
1073
+ def setRangeText(self, replacement: str) -> None: ...
1074
+ @overload
1075
+ def setRangeText(self, replacement: str, start: int, end: int, selectionMode: SelectionMode | None = "preserve") -> None: ...
1076
+ def setSelectionRange(self, start: int, end: int, direction: str | None = None) -> None: ...
1077
+
1078
+ class HTMLSelectElement(HTMLElement):
1079
+ @classmethod
1080
+ def new(self) -> HTMLSelectElement: ...
1081
+ autocomplete: str
1082
+ disabled: bool
1083
+ form: HTMLFormElement | None
1084
+ multiple: bool
1085
+ name: str
1086
+ required: bool
1087
+ size: int
1088
+ type: str
1089
+ options: HTMLOptionsCollection
1090
+ length: int
1091
+ def namedItem(self, name: str) -> HTMLOptionElement | None: ...
1092
+ def add(self, element: HTMLOptionElement | HTMLOptGroupElement, before: HTMLElement | int | None = None) -> None: ...
1093
+ @overload
1094
+ def remove(self) -> None: ...
1095
+ @overload
1096
+ def remove(self, index: int) -> None: ...
1097
+ selectedOptions: HTMLCollection
1098
+ selectedIndex: int
1099
+ value: str
1100
+ willValidate: bool
1101
+ validity: ValidityState
1102
+ validationMessage: str
1103
+ def checkValidity(self) -> bool: ...
1104
+ def reportValidity(self) -> bool: ...
1105
+ def setCustomValidity(self, error: str) -> None: ...
1106
+ labels: NodeList
1107
+
1108
+ class HTMLOptionElement(HTMLElement):
1109
+ @classmethod
1110
+ def new(self) -> HTMLOptionElement: ...
1111
+ """ # GIgnoredStmt
1112
+ LegacyFactoryFunction=Option(optional DOMString text = "", optional DOMString value, optional boolean defaultSelected = False, optional boolean selected = False)
1113
+ """
1114
+ disabled: bool
1115
+ form: HTMLFormElement | None
1116
+ label: str
1117
+ defaultSelected: bool
1118
+ selected: bool
1119
+ value: str
1120
+ text: str
1121
+ index: int
1122
+
1123
+ class HTMLOptGroupElement(HTMLElement):
1124
+ @classmethod
1125
+ def new(self) -> HTMLOptGroupElement: ...
1126
+ disabled: bool
1127
+ label: str
1128
+
1129
+ class HTMLButtonElement(HTMLElement):
1130
+ @classmethod
1131
+ def new(self) -> HTMLButtonElement: ...
1132
+ disabled: bool
1133
+ form: HTMLFormElement | None
1134
+ formAction: USVString
1135
+ formEnctype: str
1136
+ formMethod: str
1137
+ formNoValidate: bool
1138
+ formTarget: str
1139
+ name: str
1140
+ type: str
1141
+ value: str
1142
+ willValidate: bool
1143
+ validity: ValidityState
1144
+ validationMessage: str
1145
+ def checkValidity(self) -> bool: ...
1146
+ def reportValidity(self) -> bool: ...
1147
+ def setCustomValidity(self, error: str) -> None: ...
1148
+ labels: NodeList
1149
+
1150
+ class HTMLAnchorElement(HTMLElement, HTMLAttributionSrcElementUtils, HTMLHyperlinkElementUtils):
1151
+ @classmethod
1152
+ def new(self) -> HTMLAnchorElement: ...
1153
+ target: str
1154
+ download: str
1155
+ ping: USVString
1156
+ rel: str
1157
+ relList: DOMTokenList
1158
+ hreflang: str
1159
+ type: str
1160
+ text: str
1161
+ referrerPolicy: str
1162
+ coords: str
1163
+ charset: str
1164
+ name: str
1165
+ rev: str
1166
+ shape: str
1167
+ attributionSourceId: int
1168
+
1169
+ class HTMLImageElement(HTMLElement, HTMLAttributionSrcElementUtils):
1170
+ @classmethod
1171
+ def new(self) -> HTMLImageElement: ...
1172
+ x: int
1173
+ y: int
1174
+ """ # GIgnoredStmt
1175
+ LegacyFactoryFunction=Image(optional unsigned long width, optional unsigned long height)
1176
+ """
1177
+ alt: str
1178
+ src: USVString
1179
+ srcset: USVString
1180
+ sizes: str
1181
+ crossOrigin: str | None
1182
+ useMap: str
1183
+ isMap: bool
1184
+ width: int
1185
+ height: int
1186
+ naturalWidth: int
1187
+ naturalHeight: int
1188
+ complete: bool
1189
+ currentSrc: USVString
1190
+ referrerPolicy: str
1191
+ decoding: str
1192
+ loading: str
1193
+ def decode(self) -> Awaitable[None]: ...
1194
+ name: str
1195
+ lowsrc: USVString
1196
+ align: str
1197
+ hspace: int
1198
+ vspace: int
1199
+ longDesc: USVString
1200
+ border: str
1201
+ fetchPriority: str
1202
+
1203
+ class HTMLCanvasElement(HTMLElement):
1204
+ @classmethod
1205
+ def new(self) -> HTMLCanvasElement: ...
1206
+ width: int
1207
+ height: int
1208
+ def getContext(self, contextId: str, options: Any | None = None) -> RenderingContext | None: ...
1209
+ def toDataURL(self, type: str | None = "image/png", quality: Any | None = None) -> USVString: ...
1210
+ def toBlob(self, callback: BlobCallback, type: str | None = "image/png", quality: Any | None = None) -> None: ...
1211
+ def transferControlToOffscreen(self) -> OffscreenCanvas: ...
1212
+ def captureStream(self, frameRequestRate: float | None = None) -> MediaStream: ...
1213
+
1214
+ class HTMLVideoElement(HTMLMediaElement):
1215
+ @classmethod
1216
+ def new(self) -> HTMLVideoElement: ...
1217
+ width: int
1218
+ height: int
1219
+ videoWidth: int
1220
+ videoHeight: int
1221
+ poster: USVString
1222
+ playsInline: bool
1223
+ def getVideoPlaybackQuality(self) -> VideoPlaybackQuality: ...
1224
+ def requestPictureInPicture(self) -> Awaitable[PictureInPictureWindow]: ...
1225
+ onenterpictureinpicture: EventHandler
1226
+ onleavepictureinpicture: EventHandler
1227
+ disablePictureInPicture: bool
1228
+ def requestVideoFrameCallback(self, callback: VideoFrameRequestCallback) -> int: ...
1229
+ def cancelVideoFrameCallback(self, handle: int) -> None: ...
1230
+
1231
+ class HTMLAudioElement(HTMLMediaElement):
1232
+ @classmethod
1233
+ def new(self) -> HTMLAudioElement: ...
1234
+ """ # GIgnoredStmt
1235
+ LegacyFactoryFunction=Audio(optional DOMString src)
1236
+ """
1237
+
1238
+ class HTMLSourceElement(HTMLElement):
1239
+ @classmethod
1240
+ def new(self) -> HTMLSourceElement: ...
1241
+ src: USVString
1242
+ type: str
1243
+ srcset: USVString
1244
+ sizes: str
1245
+ media: str
1246
+ width: int
1247
+ height: int
1248
+
1249
+ class HTMLMediaElement(HTMLElement):
1250
+ sinkId: str
1251
+ def setSinkId(self, sinkId: str) -> Awaitable[None]: ...
1252
+ mediaKeys: MediaKeys | None
1253
+ onencrypted: EventHandler
1254
+ onwaitingforkey: EventHandler
1255
+ def setMediaKeys(self, mediaKeys: MediaKeys | None) -> Awaitable[None]: ...
1256
+ error: MediaError | None
1257
+ src: USVString
1258
+ srcObject: MediaProvider | None
1259
+ currentSrc: USVString
1260
+ crossOrigin: str | None
1261
+ NETWORK_EMPTY = 0
1262
+ NETWORK_IDLE = 1
1263
+ NETWORK_LOADING = 2
1264
+ NETWORK_NO_SOURCE = 3
1265
+ networkState: int
1266
+ preload: str
1267
+ buffered: TimeRanges
1268
+ def load(self) -> None: ...
1269
+ def canPlayType(self, type: str) -> CanPlayTypeResult: ...
1270
+ HAVE_NOTHING = 0
1271
+ HAVE_METADATA = 1
1272
+ HAVE_CURRENT_DATA = 2
1273
+ HAVE_FUTURE_DATA = 3
1274
+ HAVE_ENOUGH_DATA = 4
1275
+ readyState: int
1276
+ seeking: bool
1277
+ currentTime: float
1278
+ def fastSeek(self, time: float) -> None: ...
1279
+ duration: float
1280
+ def getStartDate(self) -> object: ...
1281
+ paused: bool
1282
+ defaultPlaybackRate: float
1283
+ playbackRate: float
1284
+ preservesPitch: bool
1285
+ played: TimeRanges
1286
+ seekable: TimeRanges
1287
+ ended: bool
1288
+ autoplay: bool
1289
+ loop: bool
1290
+ def play(self) -> Awaitable[None]: ...
1291
+ def pause(self) -> None: ...
1292
+ controls: bool
1293
+ volume: float
1294
+ muted: bool
1295
+ defaultMuted: bool
1296
+ audioTracks: AudioTrackList
1297
+ videoTracks: VideoTrackList
1298
+ textTracks: TextTrackList
1299
+ def addTextTrack(self, kind: TextTrackKind, label: str | None = "", language: str | None = "") -> TextTrack: ...
1300
+ def captureStream(self) -> MediaStream: ...
1301
+ remote: RemotePlayback
1302
+ disableRemotePlayback: bool
1303
+
1304
+ class HTMLIFrameElement(HTMLElement):
1305
+ @classmethod
1306
+ def new(self) -> HTMLIFrameElement: ...
1307
+ csp: str
1308
+ src: USVString
1309
+ srcdoc: str
1310
+ name: str
1311
+ sandbox: DOMTokenList
1312
+ allow: str
1313
+ allowFullscreen: bool
1314
+ width: str
1315
+ height: str
1316
+ referrerPolicy: str
1317
+ loading: str
1318
+ contentDocument: Document | None
1319
+ contentWindow: WindowProxy | None
1320
+ def getSVGDocument(self) -> Document | None: ...
1321
+ align: str
1322
+ scrolling: str
1323
+ frameBorder: str
1324
+ longDesc: USVString
1325
+ marginHeight: str
1326
+ marginWidth: str
1327
+ permissionsPolicy: PermissionsPolicy
1328
+ fetchPriority: str
1329
+
1330
+ class HTMLScriptElement(HTMLElement, HTMLAttributionSrcElementUtils):
1331
+ @classmethod
1332
+ def new(self) -> HTMLScriptElement: ...
1333
+ src: USVString
1334
+ type: str
1335
+ noModule: bool
1336
+ async_: bool
1337
+ defer: bool
1338
+ crossOrigin: str | None
1339
+ text: str
1340
+ integrity: str
1341
+ referrerPolicy: str
1342
+ blocking: DOMTokenList
1343
+ charset: str
1344
+ event: str
1345
+ htmlFor: str
1346
+ fetchPriority: str
1347
+
1348
+ class HTMLStyleElement(HTMLElement, LinkStyle):
1349
+ @classmethod
1350
+ def new(self) -> HTMLStyleElement: ...
1351
+ disabled: bool
1352
+ media: str
1353
+ blocking: DOMTokenList
1354
+ type: str
1355
+
1356
+ class HTMLLinkElement(HTMLElement, LinkStyle):
1357
+ @classmethod
1358
+ def new(self) -> HTMLLinkElement: ...
1359
+ href: USVString
1360
+ crossOrigin: str | None
1361
+ rel: str
1362
+ relList: DOMTokenList
1363
+ media: str
1364
+ integrity: str
1365
+ hreflang: str
1366
+ type: str
1367
+ sizes: DOMTokenList
1368
+ imageSrcset: USVString
1369
+ imageSizes: str
1370
+ referrerPolicy: str
1371
+ blocking: DOMTokenList
1372
+ disabled: bool
1373
+ charset: str
1374
+ rev: str
1375
+ target: str
1376
+ fetchPriority: str
1377
+
1378
+ class HTMLMetaElement(HTMLElement):
1379
+ @classmethod
1380
+ def new(self) -> HTMLMetaElement: ...
1381
+ name: str
1382
+ httpEquiv: str
1383
+ content: str
1384
+ media: str
1385
+ scheme: str
1386
+
1387
+ class HTMLTemplateElement(HTMLElement):
1388
+ @classmethod
1389
+ def new(self) -> HTMLTemplateElement: ...
1390
+ content: DocumentFragment
1391
+
1392
+ class HTMLDialogElement(HTMLElement):
1393
+ @classmethod
1394
+ def new(self) -> HTMLDialogElement: ...
1395
+ open: bool
1396
+ returnValue: str
1397
+ def show(self) -> None: ...
1398
+ def showModal(self) -> None: ...
1399
+ def close(self, returnValue: str | None = None) -> None: ...
1400
+
1401
+ class Window(EventTarget, GlobalEventHandlers, WindowEventHandlers, WindowOrWorkerGlobalScope, AnimationFrameProvider, WindowSessionStorage, WindowLocalStorage):
1402
+ orientation: short
1403
+ onorientationchange: EventHandler
1404
+ cookieStore: CookieStore
1405
+ def navigate(self, dir: SpatialNavigationDirection) -> None: ...
1406
+ def matchMedia(self, query: CSSOMString) -> MediaQueryList: ...
1407
+ screen: Screen
1408
+ visualViewport: VisualViewport | None
1409
+ def moveTo(self, x: int, y: int) -> None: ...
1410
+ def moveBy(self, x: int, y: int) -> None: ...
1411
+ def resizeTo(self, width: int, height: int) -> None: ...
1412
+ def resizeBy(self, x: int, y: int) -> None: ...
1413
+ innerWidth: int
1414
+ innerHeight: int
1415
+ scrollX: float
1416
+ pageXOffset: float
1417
+ scrollY: float
1418
+ pageYOffset: float
1419
+ @overload
1420
+ def scroll(self, options: ScrollToOptions | None = {}) -> None: ...
1421
+ @overload
1422
+ def scroll(self, x: float, y: float) -> None: ...
1423
+ @overload
1424
+ def scrollTo(self, options: ScrollToOptions | None = {}) -> None: ...
1425
+ @overload
1426
+ def scrollTo(self, x: float, y: float) -> None: ...
1427
+ @overload
1428
+ def scrollBy(self, options: ScrollToOptions | None = {}) -> None: ...
1429
+ @overload
1430
+ def scrollBy(self, x: float, y: float) -> None: ...
1431
+ screenX: int
1432
+ screenLeft: int
1433
+ screenY: int
1434
+ screenTop: int
1435
+ outerWidth: int
1436
+ outerHeight: int
1437
+ devicePixelRatio: float
1438
+ def getComputedStyle(self, elt: Element, pseudoElt: CSSOMString | None = None) -> CSSStyleDeclaration: ...
1439
+ def getDigitalGoodsService(self, serviceProvider: str) -> Awaitable[DigitalGoodsService]: ...
1440
+ event: Event | None
1441
+ def showOpenFilePicker(self, options: OpenFilePickerOptions | None = {}) -> Awaitable[Sequence[FileSystemFileHandle]]: ...
1442
+ def showSaveFilePicker(self, options: SaveFilePickerOptions | None = {}) -> Awaitable[FileSystemFileHandle]: ...
1443
+ def showDirectoryPicker(self, options: DirectoryPickerOptions | None = {}) -> Awaitable[FileSystemDirectoryHandle]: ...
1444
+ window: WindowProxy
1445
+ self: WindowProxy
1446
+ document: Document
1447
+ name: str
1448
+ location: Location
1449
+ history: History
1450
+ customElements: CustomElementRegistry
1451
+ locationbar: BarProp
1452
+ menubar: BarProp
1453
+ personalbar: BarProp
1454
+ scrollbars: BarProp
1455
+ statusbar: BarProp
1456
+ toolbar: BarProp
1457
+ status: str
1458
+ def close(self) -> None: ...
1459
+ closed: bool
1460
+ def stop(self) -> None: ...
1461
+ def focus(self) -> None: ...
1462
+ def blur(self) -> None: ...
1463
+ frames: WindowProxy
1464
+ length: int
1465
+ top: WindowProxy | None
1466
+ opener: Any
1467
+ parent: WindowProxy | None
1468
+ frameElement: Element | None
1469
+ def open(self, url: USVString | None = "", target: str | None = "_blank", features: str | None = "") -> WindowProxy | None: ...
1470
+ navigator: Navigator
1471
+ clientInformation: Navigator
1472
+ originAgentCluster: bool
1473
+ @overload
1474
+ def alert(self) -> None: ...
1475
+ @overload
1476
+ def alert(self, message: str) -> None: ...
1477
+ def confirm(self, message: str | None = "") -> bool: ...
1478
+ def prompt(self, message: str | None = "", default: str | None = "") -> str | None: ...
1479
+ def print(self) -> None: ...
1480
+ @overload
1481
+ def postMessage(self, message: Any, targetOrigin: USVString, transfer: Sequence[object] | None = []) -> None: ...
1482
+ @overload
1483
+ def postMessage(self, message: Any, options: WindowPostMessageOptions | None = {}) -> None: ...
1484
+ def captureEvents(self) -> None: ...
1485
+ def releaseEvents(self) -> None: ...
1486
+ external: External
1487
+ def queryLocalFonts(self, options: QueryOptions | None = {}) -> Awaitable[Sequence[FontData]]: ...
1488
+ onappinstalled: EventHandler
1489
+ onbeforeinstallprompt: EventHandler
1490
+ navigation: Navigation
1491
+ ondeviceorientation: EventHandler
1492
+ ondeviceorientationabsolute: EventHandler
1493
+ oncompassneedscalibration: EventHandler
1494
+ ondevicemotion: EventHandler
1495
+ portalHost: PortalHost | None
1496
+ def requestIdleCallback(self, callback: IdleRequestCallback, options: IdleRequestOptions | None = {}) -> int: ...
1497
+ def cancelIdleCallback(self, handle: int) -> None: ...
1498
+ def getSelection(self) -> Selection | None: ...
1499
+ speechSynthesis: SpeechSynthesis
1500
+ launchQueue: LaunchQueue
1501
+ def getScreenDetails(self) -> Awaitable[ScreenDetails]: ...
1502
+
1503
+ class Location:
1504
+ href: USVString
1505
+ origin: USVString
1506
+ protocol: USVString
1507
+ host: USVString
1508
+ hostname: USVString
1509
+ port: USVString
1510
+ pathname: USVString
1511
+ search: USVString
1512
+ hash: USVString
1513
+ def assign(self, url: USVString) -> None: ...
1514
+ def replace(self, url: USVString) -> None: ...
1515
+ def reload(self) -> None: ...
1516
+ ancestorOrigins: DOMStringList
1517
+
1518
+ class History:
1519
+ length: int
1520
+ scrollRestoration: ScrollRestoration
1521
+ state: Any
1522
+ def go(self, delta: int | None = 0) -> None: ...
1523
+ def back(self) -> None: ...
1524
+ def forward(self) -> None: ...
1525
+ def pushState(self, data: Any, unused: str, url: USVString | None = None) -> None: ...
1526
+ def replaceState(self, data: Any, unused: str, url: USVString | None = None) -> None: ...
1527
+
1528
+ class Navigator(NavigatorBadge, NavigatorDeviceMemory, NavigatorID, NavigatorLanguage, NavigatorOnLine, NavigatorContentUtils, NavigatorCookies, NavigatorPlugins, NavigatorConcurrentHardware, NavigatorNetworkInformation, NavigatorStorage, NavigatorUA, NavigatorLocks, NavigatorAutomationInformation, NavigatorGPU, NavigatorML):
1529
+ @overload
1530
+ def getAutoplayPolicy(self, type: AutoplayPolicyMediaType) -> AutoplayPolicy: ...
1531
+ @overload
1532
+ def getAutoplayPolicy(self, element: HTMLMediaElement) -> AutoplayPolicy: ...
1533
+ @overload
1534
+ def getAutoplayPolicy(self, context: AudioContext) -> AutoplayPolicy: ...
1535
+ def setClientBadge(self, contents: int | None = None) -> Awaitable[None]: ...
1536
+ def clearClientBadge(self) -> Awaitable[None]: ...
1537
+ def getBattery(self) -> Awaitable[BatteryManager]: ...
1538
+ def sendBeacon(self, url: USVString, data: BodyInit | None = None) -> bool: ...
1539
+ clipboard: Clipboard
1540
+ contacts: ContactsManager
1541
+ credentials: CredentialsContainer
1542
+ devicePosture: DevicePosture
1543
+ def requestMediaKeySystemAccess(self, keySystem: str, supportedConfigurations: Sequence[MediaKeySystemConfiguration]) -> Awaitable[MediaKeySystemAccess]: ...
1544
+ epubReadingSystem: EpubReadingSystem
1545
+ def getGamepads(self) -> Sequence[Gamepad | None]: ...
1546
+ geolocation: Geolocation
1547
+ def getInstalledRelatedApps(self) -> Awaitable[Sequence[RelatedApplication]]: ...
1548
+ userActivation: UserActivation
1549
+ ink: Ink
1550
+ scheduling: Scheduling
1551
+ keyboard: Keyboard
1552
+ mediaCapabilities: MediaCapabilities
1553
+ mediaDevices: MediaDevices
1554
+ def getUserMedia(self, constraints: MediaStreamConstraints, successCallback: NavigatorUserMediaSuccessCallback, errorCallback: NavigatorUserMediaErrorCallback) -> None: ...
1555
+ mediaSession: MediaSession
1556
+ permissions: Permissions
1557
+ maxTouchPoints: int
1558
+ presentation: Presentation
1559
+ wakeLock: WakeLock
1560
+ serial: Serial
1561
+ serviceWorker: ServiceWorkerContainer
1562
+ def vibrate(self, pattern: VibratePattern) -> bool: ...
1563
+ virtualKeyboard: VirtualKeyboard
1564
+ bluetooth: Bluetooth
1565
+ def share(self, data: ShareData | None = {}) -> Awaitable[None]: ...
1566
+ def canShare(self, data: ShareData | None = {}) -> bool: ...
1567
+ hid: HID
1568
+ def requestMIDIAccess(self, options: MIDIOptions | None = {}) -> Awaitable[MIDIAccess]: ...
1569
+ usb: USB
1570
+ xr: XRSystem
1571
+ windowControlsOverlay: WindowControlsOverlay
1572
+
1573
+ class Storage:
1574
+ length: int
1575
+ def key(self, index: int) -> str | None: ...
1576
+ def clear(self) -> None: ...
1577
+
1578
+ class ConsoleNamespace:
1579
+ def assert_(self, condition: bool | None = False, *data: Any) -> None: ...
1580
+ def clear(self) -> None: ...
1581
+ def debug(self, *data: Any) -> None: ...
1582
+ def error(self, *data: Any) -> None: ...
1583
+ def info(self, *data: Any) -> None: ...
1584
+ def log(self, *data: Any) -> None: ...
1585
+ def table(self, tabularData: Any | None = None, properties: Sequence[str] | None = None) -> None: ...
1586
+ def trace(self, *data: Any) -> None: ...
1587
+ def warn(self, *data: Any) -> None: ...
1588
+ def dir(self, item: Any | None = None, options: object | None = None) -> None: ...
1589
+ def dirxml(self, *data: Any) -> None: ...
1590
+ def count(self, label: str | None = "default") -> None: ...
1591
+ def countReset(self, label: str | None = "default") -> None: ...
1592
+ def group(self, *data: Any) -> None: ...
1593
+ def groupCollapsed(self, *data: Any) -> None: ...
1594
+ def groupEnd(self) -> None: ...
1595
+ def time(self, label: str | None = "default") -> None: ...
1596
+ def timeLog(self, label: str | None = "default", *data: Any) -> None: ...
1597
+ def timeEnd(self, label: str | None = "default") -> None: ...
1598
+
1599
+ class Clipboard(EventTarget):
1600
+ def read(self) -> Awaitable[ClipboardItems]: ...
1601
+ def readText(self) -> Awaitable[str]: ...
1602
+ def write(self, data: ClipboardItems) -> Awaitable[None]: ...
1603
+ def writeText(self, data: str) -> Awaitable[None]: ...
1604
+
1605
+ class Geolocation:
1606
+ def getCurrentPosition(self, successCallback: PositionCallback, errorCallback: PositionErrorCallback | None = None, options: PositionOptions | None = {}) -> None: ...
1607
+ def watchPosition(self, successCallback: PositionCallback, errorCallback: PositionErrorCallback | None = None, options: PositionOptions | None = {}) -> int: ...
1608
+ def clearWatch(self, watchId: int) -> None: ...
1609
+
1610
+ class Screen:
1611
+ availWidth: int
1612
+ availHeight: int
1613
+ width: int
1614
+ height: int
1615
+ colorDepth: int
1616
+ pixelDepth: int
1617
+ orientation: ScreenOrientation
1618
+ isExtended: bool
1619
+ onchange: EventHandler
1620
+
1621
+ class CSSStyleDeclaration:
1622
+ cssText: CSSOMString
1623
+ length: int
1624
+ def getPropertyValue(self, property: CSSOMString) -> CSSOMString: ...
1625
+ def getPropertyPriority(self, property: CSSOMString) -> CSSOMString: ...
1626
+ def setProperty(self, property: CSSOMString, value: CSSOMString, priority: CSSOMString | None = "") -> None: ...
1627
+ def removeProperty(self, property: CSSOMString) -> CSSOMString: ...
1628
+ parentRule: CSSRule | None
1629
+ cssFloat: CSSOMString
1630
+ accentColor: str
1631
+ additiveSymbols: str
1632
+ alignContent: str
1633
+ alignItems: str
1634
+ alignSelf: str
1635
+ alignmentBaseline: str
1636
+ all: str
1637
+ animation: str
1638
+ animationComposition: str
1639
+ animationDelay: str
1640
+ animationDirection: str
1641
+ animationDuration: str
1642
+ animationFillMode: str
1643
+ animationIterationCount: str
1644
+ animationName: str
1645
+ animationPlayState: str
1646
+ animationTimingFunction: str
1647
+ appRegion: str
1648
+ appearance: str
1649
+ ascentOverride: str
1650
+ aspectRatio: str
1651
+ backdropFilter: str
1652
+ backfaceVisibility: str
1653
+ background: str
1654
+ backgroundAttachment: str
1655
+ backgroundBlendMode: str
1656
+ backgroundClip: str
1657
+ backgroundColor: str
1658
+ backgroundImage: str
1659
+ backgroundOrigin: str
1660
+ backgroundPosition: str
1661
+ backgroundPositionX: str
1662
+ backgroundPositionY: str
1663
+ backgroundRepeat: str
1664
+ backgroundRepeatX: str
1665
+ backgroundRepeatY: str
1666
+ backgroundSize: str
1667
+ basePalette: str
1668
+ baselineShift: str
1669
+ baselineSource: str
1670
+ blockSize: str
1671
+ border: str
1672
+ borderBlock: str
1673
+ borderBlockColor: str
1674
+ borderBlockEnd: str
1675
+ borderBlockEndColor: str
1676
+ borderBlockEndStyle: str
1677
+ borderBlockEndWidth: str
1678
+ borderBlockStart: str
1679
+ borderBlockStartColor: str
1680
+ borderBlockStartStyle: str
1681
+ borderBlockStartWidth: str
1682
+ borderBlockStyle: str
1683
+ borderBlockWidth: str
1684
+ borderBottom: str
1685
+ borderBottomColor: str
1686
+ borderBottomLeftRadius: str
1687
+ borderBottomRightRadius: str
1688
+ borderBottomStyle: str
1689
+ borderBottomWidth: str
1690
+ borderCollapse: str
1691
+ borderColor: str
1692
+ borderEndEndRadius: str
1693
+ borderEndStartRadius: str
1694
+ borderImage: str
1695
+ borderImageOutset: str
1696
+ borderImageRepeat: str
1697
+ borderImageSlice: str
1698
+ borderImageSource: str
1699
+ borderImageWidth: str
1700
+ borderInline: str
1701
+ borderInlineColor: str
1702
+ borderInlineEnd: str
1703
+ borderInlineEndColor: str
1704
+ borderInlineEndStyle: str
1705
+ borderInlineEndWidth: str
1706
+ borderInlineStart: str
1707
+ borderInlineStartColor: str
1708
+ borderInlineStartStyle: str
1709
+ borderInlineStartWidth: str
1710
+ borderInlineStyle: str
1711
+ borderInlineWidth: str
1712
+ borderLeft: str
1713
+ borderLeftColor: str
1714
+ borderLeftStyle: str
1715
+ borderLeftWidth: str
1716
+ borderRadius: str
1717
+ borderRight: str
1718
+ borderRightColor: str
1719
+ borderRightStyle: str
1720
+ borderRightWidth: str
1721
+ borderSpacing: str
1722
+ borderStartEndRadius: str
1723
+ borderStartStartRadius: str
1724
+ borderStyle: str
1725
+ borderTop: str
1726
+ borderTopColor: str
1727
+ borderTopLeftRadius: str
1728
+ borderTopRightRadius: str
1729
+ borderTopStyle: str
1730
+ borderTopWidth: str
1731
+ borderWidth: str
1732
+ bottom: str
1733
+ boxShadow: str
1734
+ boxSizing: str
1735
+ breakAfter: str
1736
+ breakBefore: str
1737
+ breakInside: str
1738
+ bufferedRendering: str
1739
+ captionSide: str
1740
+ caretColor: str
1741
+ clear: str
1742
+ clip: str
1743
+ clipPath: str
1744
+ clipRule: str
1745
+ color: str
1746
+ colorInterpolation: str
1747
+ colorInterpolationFilters: str
1748
+ colorRendering: str
1749
+ colorScheme: str
1750
+ columnCount: str
1751
+ columnFill: str
1752
+ columnGap: str
1753
+ columnRule: str
1754
+ columnRuleColor: str
1755
+ columnRuleStyle: str
1756
+ columnRuleWidth: str
1757
+ columnSpan: str
1758
+ columnWidth: str
1759
+ columns: str
1760
+ contain: str
1761
+ containIntrinsicBlockSize: str
1762
+ containIntrinsicHeight: str
1763
+ containIntrinsicInlineSize: str
1764
+ containIntrinsicSize: str
1765
+ containIntrinsicWidth: str
1766
+ container: str
1767
+ containerName: str
1768
+ containerType: str
1769
+ content: str
1770
+ contentVisibility: str
1771
+ counterIncrement: str
1772
+ counterReset: str
1773
+ counterSet: str
1774
+ cursor: str
1775
+ cx: str
1776
+ cy: str
1777
+ descentOverride: str
1778
+ direction: str
1779
+ display: str
1780
+ dominantBaseline: str
1781
+ emptyCells: str
1782
+ fallback: str
1783
+ fill: str
1784
+ fillOpacity: str
1785
+ fillRule: str
1786
+ filter: str
1787
+ flex: str
1788
+ flexBasis: str
1789
+ flexDirection: str
1790
+ flexFlow: str
1791
+ flexGrow: str
1792
+ flexShrink: str
1793
+ flexWrap: str
1794
+ floodColor: str
1795
+ floodOpacity: str
1796
+ font: str
1797
+ fontDisplay: str
1798
+ fontFamily: str
1799
+ fontFeatureSettings: str
1800
+ fontKerning: str
1801
+ fontOpticalSizing: str
1802
+ fontPalette: str
1803
+ fontSize: str
1804
+ fontStretch: str
1805
+ fontStyle: str
1806
+ fontSynthesis: str
1807
+ fontSynthesisSmallCaps: str
1808
+ fontSynthesisStyle: str
1809
+ fontSynthesisWeight: str
1810
+ fontVariant: str
1811
+ fontVariantAlternates: str
1812
+ fontVariantCaps: str
1813
+ fontVariantEastAsian: str
1814
+ fontVariantLigatures: str
1815
+ fontVariantNumeric: str
1816
+ fontVariationSettings: str
1817
+ fontWeight: str
1818
+ forcedColorAdjust: str
1819
+ gap: str
1820
+ grid: str
1821
+ gridArea: str
1822
+ gridAutoColumns: str
1823
+ gridAutoFlow: str
1824
+ gridAutoRows: str
1825
+ gridColumn: str
1826
+ gridColumnEnd: str
1827
+ gridColumnGap: str
1828
+ gridColumnStart: str
1829
+ gridGap: str
1830
+ gridRow: str
1831
+ gridRowEnd: str
1832
+ gridRowGap: str
1833
+ gridRowStart: str
1834
+ gridTemplate: str
1835
+ gridTemplateAreas: str
1836
+ gridTemplateColumns: str
1837
+ gridTemplateRows: str
1838
+ height: str
1839
+ hyphenateCharacter: str
1840
+ hyphenateLimitChars: str
1841
+ hyphens: str
1842
+ imageOrientation: str
1843
+ imageRendering: str
1844
+ inherits: str
1845
+ initialLetter: str
1846
+ initialValue: str
1847
+ inlineSize: str
1848
+ inset: str
1849
+ insetBlock: str
1850
+ insetBlockEnd: str
1851
+ insetBlockStart: str
1852
+ insetInline: str
1853
+ insetInlineEnd: str
1854
+ insetInlineStart: str
1855
+ isolation: str
1856
+ justifyContent: str
1857
+ justifyItems: str
1858
+ justifySelf: str
1859
+ left: str
1860
+ letterSpacing: str
1861
+ lightingColor: str
1862
+ lineBreak: str
1863
+ lineGapOverride: str
1864
+ lineHeight: str
1865
+ listStyle: str
1866
+ listStyleImage: str
1867
+ listStylePosition: str
1868
+ listStyleType: str
1869
+ margin: str
1870
+ marginBlock: str
1871
+ marginBlockEnd: str
1872
+ marginBlockStart: str
1873
+ marginBottom: str
1874
+ marginInline: str
1875
+ marginInlineEnd: str
1876
+ marginInlineStart: str
1877
+ marginLeft: str
1878
+ marginRight: str
1879
+ marginTop: str
1880
+ marker: str
1881
+ markerEnd: str
1882
+ markerMid: str
1883
+ markerStart: str
1884
+ mask: str
1885
+ maskType: str
1886
+ mathDepth: str
1887
+ mathShift: str
1888
+ mathStyle: str
1889
+ maxBlockSize: str
1890
+ maxHeight: str
1891
+ maxInlineSize: str
1892
+ maxWidth: str
1893
+ minBlockSize: str
1894
+ minHeight: str
1895
+ minInlineSize: str
1896
+ minWidth: str
1897
+ mixBlendMode: str
1898
+ negative: str
1899
+ objectFit: str
1900
+ objectPosition: str
1901
+ objectViewBox: str
1902
+ offset: str
1903
+ offsetDistance: str
1904
+ offsetPath: str
1905
+ offsetRotate: str
1906
+ opacity: str
1907
+ order: str
1908
+ orphans: str
1909
+ outline: str
1910
+ outlineColor: str
1911
+ outlineOffset: str
1912
+ outlineStyle: str
1913
+ outlineWidth: str
1914
+ overflow: str
1915
+ overflowAnchor: str
1916
+ overflowClipMargin: str
1917
+ overflowWrap: str
1918
+ overflowX: str
1919
+ overflowY: str
1920
+ overrideColors: str
1921
+ overscrollBehavior: str
1922
+ overscrollBehaviorBlock: str
1923
+ overscrollBehaviorInline: str
1924
+ overscrollBehaviorX: str
1925
+ overscrollBehaviorY: str
1926
+ pad: str
1927
+ padding: str
1928
+ paddingBlock: str
1929
+ paddingBlockEnd: str
1930
+ paddingBlockStart: str
1931
+ paddingBottom: str
1932
+ paddingInline: str
1933
+ paddingInlineEnd: str
1934
+ paddingInlineStart: str
1935
+ paddingLeft: str
1936
+ paddingRight: str
1937
+ paddingTop: str
1938
+ page: str
1939
+ pageBreakAfter: str
1940
+ pageBreakBefore: str
1941
+ pageBreakInside: str
1942
+ pageOrientation: str
1943
+ paintOrder: str
1944
+ perspective: str
1945
+ perspectiveOrigin: str
1946
+ placeContent: str
1947
+ placeItems: str
1948
+ placeSelf: str
1949
+ pointerEvents: str
1950
+ position: str
1951
+ prefix: str
1952
+ quotes: str
1953
+ range: str
1954
+ resize: str
1955
+ right: str
1956
+ rotate: str
1957
+ rowGap: str
1958
+ rubyPosition: str
1959
+ rx: str
1960
+ ry: str
1961
+ scale: str
1962
+ scrollBehavior: str
1963
+ scrollMargin: str
1964
+ scrollMarginBlock: str
1965
+ scrollMarginBlockEnd: str
1966
+ scrollMarginBlockStart: str
1967
+ scrollMarginBottom: str
1968
+ scrollMarginInline: str
1969
+ scrollMarginInlineEnd: str
1970
+ scrollMarginInlineStart: str
1971
+ scrollMarginLeft: str
1972
+ scrollMarginRight: str
1973
+ scrollMarginTop: str
1974
+ scrollPadding: str
1975
+ scrollPaddingBlock: str
1976
+ scrollPaddingBlockEnd: str
1977
+ scrollPaddingBlockStart: str
1978
+ scrollPaddingBottom: str
1979
+ scrollPaddingInline: str
1980
+ scrollPaddingInlineEnd: str
1981
+ scrollPaddingInlineStart: str
1982
+ scrollPaddingLeft: str
1983
+ scrollPaddingRight: str
1984
+ scrollPaddingTop: str
1985
+ scrollSnapAlign: str
1986
+ scrollSnapStop: str
1987
+ scrollSnapType: str
1988
+ scrollbarGutter: str
1989
+ shapeImageThreshold: str
1990
+ shapeMargin: str
1991
+ shapeOutside: str
1992
+ shapeRendering: str
1993
+ size: str
1994
+ sizeAdjust: str
1995
+ speak: str
1996
+ speakAs: str
1997
+ src: str
1998
+ stopColor: str
1999
+ stopOpacity: str
2000
+ stroke: str
2001
+ strokeDasharray: str
2002
+ strokeDashoffset: str
2003
+ strokeLinecap: str
2004
+ strokeLinejoin: str
2005
+ strokeMiterlimit: str
2006
+ strokeOpacity: str
2007
+ strokeWidth: str
2008
+ suffix: str
2009
+ symbols: str
2010
+ syntax: str
2011
+ system: str
2012
+ tabSize: str
2013
+ tableLayout: str
2014
+ textAlign: str
2015
+ textAlignLast: str
2016
+ textAnchor: str
2017
+ textCombineUpright: str
2018
+ textDecoration: str
2019
+ textDecorationColor: str
2020
+ textDecorationLine: str
2021
+ textDecorationSkipInk: str
2022
+ textDecorationStyle: str
2023
+ textDecorationThickness: str
2024
+ textEmphasis: str
2025
+ textEmphasisColor: str
2026
+ textEmphasisPosition: str
2027
+ textEmphasisStyle: str
2028
+ textIndent: str
2029
+ textOrientation: str
2030
+ textOverflow: str
2031
+ textRendering: str
2032
+ textShadow: str
2033
+ textSizeAdjust: str
2034
+ textTransform: str
2035
+ textUnderlineOffset: str
2036
+ textUnderlinePosition: str
2037
+ top: str
2038
+ touchAction: str
2039
+ transform: str
2040
+ transformBox: str
2041
+ transformOrigin: str
2042
+ transformStyle: str
2043
+ transition: str
2044
+ transitionDelay: str
2045
+ transitionDuration: str
2046
+ transitionProperty: str
2047
+ transitionTimingFunction: str
2048
+ translate: str
2049
+ unicodeBidi: str
2050
+ unicodeRange: str
2051
+ userSelect: str
2052
+ vectorEffect: str
2053
+ verticalAlign: str
2054
+ viewTransitionName: str
2055
+ visibility: str
2056
+ whiteSpace: str
2057
+ widows: str
2058
+ width: str
2059
+ willChange: str
2060
+ wordBreak: str
2061
+ wordSpacing: str
2062
+ wordWrap: str
2063
+ writingMode: str
2064
+ zIndex: str
2065
+ zoom: str
2066
+
2067
+ class CSSStyleSheet(StyleSheet):
2068
+ @classmethod
2069
+ def new(self, options: CSSStyleSheetInit | None = {}) -> CSSStyleSheet: ...
2070
+ ownerRule: CSSRule | None
2071
+ cssRules: CSSRuleList
2072
+ def insertRule(self, rule: CSSOMString, index: int | None = 0) -> int: ...
2073
+ def deleteRule(self, index: int) -> None: ...
2074
+ def replace(self, text: USVString) -> Awaitable[CSSStyleSheet]: ...
2075
+ def replaceSync(self, text: USVString) -> None: ...
2076
+ rules: CSSRuleList
2077
+ def addRule(self, selector: str | None = "undefined", style: str | None = "undefined", index: int | None = None) -> int: ...
2078
+ def removeRule(self, index: int | None = 0) -> None: ...
2079
+
2080
+ class StyleSheet:
2081
+ type: CSSOMString
2082
+ href: USVString | None
2083
+ ownerNode: Element | ProcessingInstruction | None
2084
+ parentStyleSheet: CSSStyleSheet | None
2085
+ title: str | None
2086
+ media: MediaList
2087
+ disabled: bool
2088
+
2089
+ class MediaQueryList(EventTarget):
2090
+ media: CSSOMString
2091
+ matches: bool
2092
+ def addListener(self, callback: EventListener | None) -> None: ...
2093
+ def removeListener(self, callback: EventListener | None) -> None: ...
2094
+ onchange: EventHandler
2095
+
2096
+ class File(Blob):
2097
+ @classmethod
2098
+ def new(self, fileBits: Sequence[BlobPart], fileName: USVString, options: FilePropertyBag | None = {}) -> File: ...
2099
+ name: str
2100
+ lastModified: int
2101
+ webkitRelativePath: USVString
2102
+
2103
+ class FileList:
2104
+ length: int
2105
+
2106
+ class Blob:
2107
+ @classmethod
2108
+ def new(self, blobParts: Sequence[BlobPart] | None = None, options: BlobPropertyBag | None = {}) -> Blob: ...
2109
+ size: int
2110
+ type: str
2111
+ def slice(self, start: int | None = None, end: int | None = None, contentType: str | None = None) -> Blob: ...
2112
+ def stream(self) -> ReadableStream: ...
2113
+ def text(self) -> Awaitable[USVString]: ...
2114
+ def arrayBuffer(self) -> Awaitable[ArrayBuffer]: ...
2115
+
2116
+ class FileReader(EventTarget):
2117
+ @classmethod
2118
+ def new(self) -> FileReader: ...
2119
+ def readAsArrayBuffer(self, blob: Blob) -> None: ...
2120
+ def readAsBinaryString(self, blob: Blob) -> None: ...
2121
+ def readAsText(self, blob: Blob, encoding: str | None = None) -> None: ...
2122
+ def readAsDataURL(self, blob: Blob) -> None: ...
2123
+ def abort(self) -> None: ...
2124
+ EMPTY = 0
2125
+ LOADING = 1
2126
+ DONE = 2
2127
+ readyState: int
2128
+ result: str | ArrayBuffer | None
2129
+ error: DOMException | None
2130
+ onloadstart: EventHandler
2131
+ onprogress: EventHandler
2132
+ onload: EventHandler
2133
+ onabort: EventHandler
2134
+ onerror: EventHandler
2135
+ onloadend: EventHandler
2136
+
2137
+ class DataTransfer:
2138
+ @classmethod
2139
+ def new(self) -> DataTransfer: ...
2140
+ dropEffect: str
2141
+ effectAllowed: str
2142
+ items: DataTransferItemList
2143
+ def setDragImage(self, image: Element, x: int, y: int) -> None: ...
2144
+ types: Sequence[str]
2145
+ def getData(self, format: str) -> str: ...
2146
+ def setData(self, format: str, data: str) -> None: ...
2147
+ def clearData(self, format: str | None = None) -> None: ...
2148
+ files: FileList
2149
+
2150
+ class DataTransferItem:
2151
+ def webkitGetAsEntry(self) -> FileSystemEntry | None: ...
2152
+ def getAsFileSystemHandle(self) -> Awaitable[FileSystemHandle | None]: ...
2153
+ kind: str
2154
+ type: str
2155
+ def getAsString(self, callback: FunctionStringCallback | None) -> None: ...
2156
+ def getAsFile(self) -> File | None: ...
2157
+
2158
+ class DataTransferItemList:
2159
+ length: int
2160
+ @overload
2161
+ def add(self, data: str, type: str) -> DataTransferItem | None: ...
2162
+ @overload
2163
+ def add(self, data: File) -> DataTransferItem | None: ...
2164
+ def remove(self, index: int) -> None: ...
2165
+ def clear(self) -> None: ...
2166
+
2167
+ class Range(AbstractRange):
2168
+ @classmethod
2169
+ def new(self) -> Range: ...
2170
+ def createContextualFragment(self, fragment: str) -> DocumentFragment: ...
2171
+ def getClientRects(self) -> DOMRectList: ...
2172
+ def getBoundingClientRect(self) -> DOMRect: ...
2173
+ commonAncestorContainer: Node
2174
+ def setStart(self, node: Node, offset: int) -> None: ...
2175
+ def setEnd(self, node: Node, offset: int) -> None: ...
2176
+ def setStartBefore(self, node: Node) -> None: ...
2177
+ def setStartAfter(self, node: Node) -> None: ...
2178
+ def setEndBefore(self, node: Node) -> None: ...
2179
+ def setEndAfter(self, node: Node) -> None: ...
2180
+ def collapse(self, toStart: bool | None = False) -> None: ...
2181
+ def selectNode(self, node: Node) -> None: ...
2182
+ def selectNodeContents(self, node: Node) -> None: ...
2183
+ START_TO_START = 0
2184
+ START_TO_END = 1
2185
+ END_TO_END = 2
2186
+ END_TO_START = 3
2187
+ def compareBoundaryPoints(self, how: int, sourceRange: Range) -> short: ...
2188
+ def deleteContents(self) -> None: ...
2189
+ def extractContents(self) -> DocumentFragment: ...
2190
+ def cloneContents(self) -> DocumentFragment: ...
2191
+ def insertNode(self, node: Node) -> None: ...
2192
+ def surroundContents(self, newParent: Node) -> None: ...
2193
+ def cloneRange(self) -> Range: ...
2194
+ def detach(self) -> None: ...
2195
+ def isPointInRange(self, node: Node, offset: int) -> bool: ...
2196
+ def comparePoint(self, node: Node, offset: int) -> short: ...
2197
+ def intersectsNode(self, node: Node) -> bool: ...
2198
+
2199
+ class Selection:
2200
+ anchorNode: Node | None
2201
+ anchorOffset: int
2202
+ focusNode: Node | None
2203
+ focusOffset: int
2204
+ isCollapsed: bool
2205
+ rangeCount: int
2206
+ type: str
2207
+ def getRangeAt(self, index: int) -> Range: ...
2208
+ def addRange(self, range: Range) -> None: ...
2209
+ def removeRange(self, range: Range) -> None: ...
2210
+ def removeAllRanges(self) -> None: ...
2211
+ def empty(self) -> None: ...
2212
+ def getComposedRange(self, *shadowRoots: ShadowRoot) -> StaticRange: ...
2213
+ def collapse(self, node: Node | None, offset: int | None = 0) -> None: ...
2214
+ def setPosition(self, node: Node | None, offset: int | None = 0) -> None: ...
2215
+ def collapseToStart(self) -> None: ...
2216
+ def collapseToEnd(self) -> None: ...
2217
+ def extend(self, node: Node, offset: int | None = 0) -> None: ...
2218
+ def setBaseAndExtent(self, anchorNode: Node, anchorOffset: int, focusNode: Node, focusOffset: int) -> None: ...
2219
+ def selectAllChildren(self, node: Node) -> None: ...
2220
+ def modify(self, alter: str | None = None, direction: str | None = None, granularity: str | None = None) -> None: ...
2221
+ def deleteFromDocument(self) -> None: ...
2222
+ def containsNode(self, node: Node, allowPartialContainment: bool | None = False) -> bool: ...
2223
+
2224
+ class MutationObserver:
2225
+ @classmethod
2226
+ def new(self, callback: MutationCallback) -> MutationObserver: ...
2227
+ def observe(self, target: Node, options: MutationObserverInit | None = {}) -> None: ...
2228
+ def disconnect(self) -> None: ...
2229
+ def takeRecords(self) -> Sequence[MutationRecord]: ...
2230
+
2231
+ class MutationRecord:
2232
+ type: str
2233
+ target: Node
2234
+ addedNodes: NodeList
2235
+ removedNodes: NodeList
2236
+ previousSibling: Node | None
2237
+ nextSibling: Node | None
2238
+ attributeName: str | None
2239
+ attributeNamespace: str | None
2240
+ oldValue: str | None
2241
+
2242
+ class IntersectionObserver:
2243
+ @classmethod
2244
+ def new(self, callback: IntersectionObserverCallback, options: IntersectionObserverInit | None = {}) -> IntersectionObserver: ...
2245
+ root: Element | Document | None
2246
+ rootMargin: str
2247
+ thresholds: Sequence[float]
2248
+ def observe(self, target: Element) -> None: ...
2249
+ def unobserve(self, target: Element) -> None: ...
2250
+ def disconnect(self) -> None: ...
2251
+ def takeRecords(self) -> Sequence[IntersectionObserverEntry]: ...
2252
+
2253
+ class IntersectionObserverEntry:
2254
+ @classmethod
2255
+ def new(self, intersectionObserverEntryInit: IntersectionObserverEntryInit) -> IntersectionObserverEntry: ...
2256
+ time: DOMHighResTimeStamp
2257
+ rootBounds: DOMRectReadOnly | None
2258
+ boundingClientRect: DOMRectReadOnly
2259
+ intersectionRect: DOMRectReadOnly
2260
+ isIntersecting: bool
2261
+ intersectionRatio: float
2262
+ target: Element
2263
+
2264
+ class ResizeObserver:
2265
+ @classmethod
2266
+ def new(self, callback: ResizeObserverCallback) -> ResizeObserver: ...
2267
+ def observe(self, target: Element, options: ResizeObserverOptions | None = {}) -> None: ...
2268
+ def unobserve(self, target: Element) -> None: ...
2269
+ def disconnect(self) -> None: ...
2270
+
2271
+ class ResizeObserverEntry:
2272
+ target: Element
2273
+ contentRect: DOMRectReadOnly
2274
+ borderBoxSize: Sequence[ResizeObserverSize]
2275
+ contentBoxSize: Sequence[ResizeObserverSize]
2276
+ devicePixelContentBoxSize: Sequence[ResizeObserverSize]
2277
+
2278
+ class CanvasRenderingContext2D(CanvasState, CanvasTransform, CanvasCompositing, CanvasImageSmoothing, CanvasFillStrokeStyles, CanvasShadowStyles, CanvasFilters, CanvasRect, CanvasDrawPath, CanvasUserInterface, CanvasText, CanvasDrawImage, CanvasImageData, CanvasPathDrawingStyles, CanvasTextDrawingStyles, CanvasPath):
2279
+ canvas: HTMLCanvasElement
2280
+ def getContextAttributes(self) -> CanvasRenderingContext2DSettings: ...
2281
+
2282
+ class ImageData:
2283
+ @overload
2284
+ @classmethod
2285
+ def new(self, sw: int, sh: int, settings: ImageDataSettings | None = {}) -> ImageData: ...
2286
+ @overload
2287
+ @classmethod
2288
+ def new(self, data: Uint8ClampedArray, sw: int, sh: int | None = None, settings: ImageDataSettings | None = {}) -> ImageData: ...
2289
+ width: int
2290
+ height: int
2291
+ data: Uint8ClampedArray
2292
+ colorSpace: PredefinedColorSpace
2293
+
2294
+ class Path2D(CanvasPath):
2295
+ @classmethod
2296
+ def new(self, path: Path2D | str | None = None) -> Path2D: ...
2297
+ def addPath(self, path: Path2D, transform: DOMMatrix2DInit | None = {}) -> None: ...
2298
+
2299
+ class URL:
2300
+ @classmethod
2301
+ def new(self, url: USVString, base: USVString | None = None) -> URL: ...
2302
+ href: USVString
2303
+ origin: USVString
2304
+ protocol: USVString
2305
+ username: USVString
2306
+ password: USVString
2307
+ host: USVString
2308
+ hostname: USVString
2309
+ port: USVString
2310
+ pathname: USVString
2311
+ search: USVString
2312
+ searchParams: URLSearchParams
2313
+ hash: USVString
2314
+ def toJSON(self) -> USVString: ...
2315
+
2316
+ class URLSearchParams:
2317
+ @classmethod
2318
+ def new(self, init: Sequence[Sequence[USVString]] | USVString | USVString | None = "") -> URLSearchParams: ...
2319
+ def append(self, name: USVString, value: USVString) -> None: ...
2320
+ def delete(self, name: USVString) -> None: ...
2321
+ def get(self, name: USVString) -> USVString | None: ...
2322
+ def getAll(self, name: USVString) -> Sequence[USVString]: ...
2323
+ def has(self, name: USVString) -> bool: ...
2324
+ def set(self, name: USVString, value: USVString) -> None: ...
2325
+ def sort(self) -> None: ...
2326
+
2327
+ class Headers:
2328
+ @classmethod
2329
+ def new(self, init: HeadersInit | None = None) -> Headers: ...
2330
+ def append(self, name: ByteString, value: ByteString) -> None: ...
2331
+ def delete(self, name: ByteString) -> None: ...
2332
+ def get(self, name: ByteString) -> ByteString | None: ...
2333
+ def has(self, name: ByteString) -> bool: ...
2334
+ def set(self, name: ByteString, value: ByteString) -> None: ...
2335
+
2336
+ class Request(Body):
2337
+ @classmethod
2338
+ def new(self, input: RequestInfo, init: RequestInit | None = {}) -> Request: ...
2339
+ method: ByteString
2340
+ url: USVString
2341
+ headers: Headers
2342
+ destination: RequestDestination
2343
+ referrer: USVString
2344
+ referrerPolicy: ReferrerPolicy
2345
+ mode: RequestMode
2346
+ credentials: RequestCredentials
2347
+ cache: RequestCache
2348
+ redirect: RequestRedirect
2349
+ integrity: str
2350
+ keepalive: bool
2351
+ isReloadNavigation: bool
2352
+ isHistoryNavigation: bool
2353
+ signal: AbortSignal
2354
+ duplex: RequestDuplex
2355
+ def clone(self) -> Request: ...
2356
+
2357
+ class Response(Body):
2358
+ @classmethod
2359
+ def new(self, body: BodyInit | None = None, init: ResponseInit | None = {}) -> Response: ...
2360
+ type: ResponseType
2361
+ url: USVString
2362
+ redirected: bool
2363
+ status: int
2364
+ ok: bool
2365
+ statusText: ByteString
2366
+ headers: Headers
2367
+ def clone(self) -> Response: ...
2368
+
2369
+ class DOMStringMap: ...
2370
+
2371
+ class DOMParser:
2372
+ @classmethod
2373
+ def new(self) -> DOMParser: ...
2374
+ def parseFromString(self, string: str, type: DOMParserSupportedType) -> Document: ...
2375
+
2376
+ class XMLSerializer:
2377
+ @classmethod
2378
+ def new(self) -> XMLSerializer: ...
2379
+ def serializeToString(self, root: Node) -> str: ...
2380
+
2381
+ class FormData:
2382
+ @classmethod
2383
+ def new(self, form: HTMLFormElement | None = None) -> FormData: ...
2384
+ @overload
2385
+ def append(self, name: USVString, value: USVString) -> None: ...
2386
+ @overload
2387
+ def append(self, name: USVString, blobValue: Blob, filename: USVString | None = None) -> None: ...
2388
+ def delete(self, name: USVString) -> None: ...
2389
+ def get(self, name: USVString) -> FormDataEntryValue | None: ...
2390
+ def getAll(self, name: USVString) -> Sequence[FormDataEntryValue]: ...
2391
+ def has(self, name: USVString) -> bool: ...
2392
+ @overload
2393
+ def set(self, name: USVString, value: USVString) -> None: ...
2394
+ @overload
2395
+ def set(self, name: USVString, blobValue: Blob, filename: USVString | None = None) -> None: ...
2396
+
2397
+ class AbortController:
2398
+ @classmethod
2399
+ def new(self) -> AbortController: ...
2400
+ signal: AbortSignal
2401
+ def abort(self, reason: Any | None = None) -> None: ...
2402
+
2403
+ class AbortSignal(EventTarget):
2404
+ aborted: bool
2405
+ reason: Any
2406
+ def throwIfAborted(self) -> None: ...
2407
+ onabort: EventHandler
2408
+
2409
+
2410
+ # Type aliases for compatibility
2411
+ Console = ConsoleNamespace
2412
+
2413
+ # USVString and ByteString are just str in Python
2414
+ USVString = str
2415
+ ByteString = str
2416
+ CSSOMString = str
2417
+
2418
+ # WebIDL numeric types
2419
+ short = int
2420
+ DOMHighResTimeStamp = float
2421
+
2422
+ # Note: webtypy's Storage is incomplete, so we override it here
2423
+ class Storage:
2424
+ """Web Storage API interface for localStorage and sessionStorage."""
2425
+ length: int
2426
+ def key(self, index: int) -> str | None: ...
2427
+ def getItem(self, key: str) -> str | None: ...
2428
+ def setItem(self, key: str, value: str) -> None: ...
2429
+ def removeItem(self, key: str) -> None: ...
2430
+ def clear(self) -> None: ...
2431
+
2432
+ # Undefined types from webtypy - aliased to Any for compatibility
2433
+ # These are WebIDL types not fully implemented in webtypy
2434
+ AbstractRange = Any
2435
+ AddEventListenerOptions = Any
2436
+ Animation = Any
2437
+ AnimationEventInit = Any
2438
+ AnimationFrameProvider = Any
2439
+ Anvil = Any
2440
+ ArrayBuffer = Any
2441
+ Attr = Any
2442
+ AudioContext = Any
2443
+ AudioTrackList = Any
2444
+ AutoplayPolicy = Any
2445
+ AutoplayPolicyMediaType = Any
2446
+ BarProp = Any
2447
+ BatteryManager = Any
2448
+ BlobCallback = Any
2449
+ BlobPart = Any
2450
+ BlobPropertyBag = Any
2451
+ Bluetooth = Any
2452
+ Body = Any
2453
+ BodyInit = Any
2454
+ BoxQuadOptions = Any
2455
+ CDATASection = Any
2456
+ CSSPseudoElement = Any
2457
+ CSSRule = Any
2458
+ CSSRuleList = Any
2459
+ CSSStyleSheetInit = Any
2460
+ CanPlayTypeResult = Any
2461
+ CanvasCompositing = Any
2462
+ CanvasDrawImage = Any
2463
+ CanvasDrawPath = Any
2464
+ CanvasFillStrokeStyles = Any
2465
+ CanvasFilters = Any
2466
+ CanvasImageData = Any
2467
+ CanvasImageSmoothing = Any
2468
+ CanvasPath = Any
2469
+ CanvasPathDrawingStyles = Any
2470
+ CanvasRect = Any
2471
+ CanvasRenderingContext2DSettings = Any
2472
+ CanvasShadowStyles = Any
2473
+ CanvasState = Any
2474
+ CanvasText = Any
2475
+ CanvasTextDrawingStyles = Any
2476
+ CanvasTransform = Any
2477
+ CanvasUserInterface = Any
2478
+ CaretPosition = Any
2479
+ CheckVisibilityOptions = Any
2480
+ ClipboardEventInit = Any
2481
+ ClipboardItems = Any
2482
+ Comment = Any
2483
+ ContactsManager = Any
2484
+ ConvertCoordinateOptions = Any
2485
+ CookieStore = Any
2486
+ CredentialsContainer = Any
2487
+ CustomElementRegistry = Any
2488
+ CustomEventInit = Any
2489
+ DOMException = Any
2490
+ DOMImplementation = Any
2491
+ DOMMatrix2DInit = Any
2492
+ DOMParserSupportedType = Any
2493
+ DOMPoint = Any
2494
+ DOMPointInit = Any
2495
+ DOMQuad = Any
2496
+ DOMQuadInit = Any
2497
+ DOMRectList = Any
2498
+ DOMStringList = Any
2499
+ DevicePosture = Any
2500
+ DigitalGoodsService = Any
2501
+ DirectoryPickerOptions = Any
2502
+ DocumentReadyState = Any
2503
+ DocumentTimeline = Any
2504
+ DocumentType = Any
2505
+ DocumentVisibilityState = Any
2506
+ DragEventInit = Any
2507
+ ELEMENT_NODE = Any
2508
+ EditContext = Any
2509
+ ElementCreationOptions = Any
2510
+ ElementInternals = Any
2511
+ EpubReadingSystem = Any
2512
+ ErrorEventInit = Any
2513
+ EventHandler = Any
2514
+ EventInit = Any
2515
+ EventListener = Any
2516
+ EventListenerOptions = Any
2517
+ External = Any
2518
+ FilePropertyBag = Any
2519
+ FileSystemDirectoryHandle = Any
2520
+ FileSystemEntry = Any
2521
+ FileSystemFileHandle = Any
2522
+ FileSystemHandle = Any
2523
+ FocusEventInit = Any
2524
+ FocusOptions = Any
2525
+ FocusableAreasOption = Any
2526
+ FontData = Any
2527
+ FontFaceSet = Any
2528
+ FontMetrics = Any
2529
+ FormDataEntryValue = Any
2530
+ FormDataEventInit = Any
2531
+ FragmentDirective = Any
2532
+ FullscreenOptions = Any
2533
+ FunctionStringCallback = Any
2534
+ GENERATED = Any
2535
+ Gamepad = Any
2536
+ GeometryNode = Any
2537
+ GetAnimationsOptions = Any
2538
+ GetRootNodeOptions = Any
2539
+ HID = Any
2540
+ HTMLAllCollection = Any
2541
+ HTMLAttributionSrcElementUtils = Any
2542
+ HTMLDataListElement = Any
2543
+ HTMLFormControlsCollection = Any
2544
+ HTMLHeadElement = Any
2545
+ HTMLHyperlinkElementUtils = Any
2546
+ HTMLOptionsCollection = Any
2547
+ HTMLOrSVGScriptElement = Any
2548
+ HTMLSlotElement = Any
2549
+ HTMLTableCaptionElement = Any
2550
+ HashChangeEventInit = Any
2551
+ HeadersInit = Any
2552
+ IdleRequestCallback = Any
2553
+ IdleRequestOptions = Any
2554
+ ImageDataSettings = Any
2555
+ Ink = Any
2556
+ InputDeviceCapabilities = Any
2557
+ InputEventInit = Any
2558
+ IntersectionObserverCallback = Any
2559
+ IntersectionObserverEntryInit = Any
2560
+ IntersectionObserverInit = Any
2561
+ Keyboard = Any
2562
+ KeyboardEventInit = Any
2563
+ KeyframeAnimationOptions = Any
2564
+ LaunchQueue = Any
2565
+ LinkStyle = Any
2566
+ MIDIAccess = Any
2567
+ MIDIOptions = Any
2568
+ MediaCapabilities = Any
2569
+ MediaDevices = Any
2570
+ MediaError = Any
2571
+ MediaKeySystemAccess = Any
2572
+ MediaKeySystemConfiguration = Any
2573
+ MediaKeys = Any
2574
+ MediaList = Any
2575
+ MediaProvider = Any
2576
+ MediaSession = Any
2577
+ MediaStream = Any
2578
+ MediaStreamConstraints = Any
2579
+ MessageEventInit = Any
2580
+ MessageEventSource = Any
2581
+ MessagePort = Any
2582
+ MouseEventInit = Any
2583
+ MutationCallback = Any
2584
+ MutationObserverInit = Any
2585
+ NamedFlowMap = Any
2586
+ NamedNodeMap = Any
2587
+ Navigation = Any
2588
+ NavigatorAutomationInformation = Any
2589
+ NavigatorBadge = Any
2590
+ NavigatorConcurrentHardware = Any
2591
+ NavigatorContentUtils = Any
2592
+ NavigatorCookies = Any
2593
+ NavigatorDeviceMemory = Any
2594
+ NavigatorGPU = Any
2595
+ NavigatorID = Any
2596
+ NavigatorLanguage = Any
2597
+ NavigatorLocks = Any
2598
+ NavigatorML = Any
2599
+ NavigatorNetworkInformation = Any
2600
+ NavigatorOnLine = Any
2601
+ NavigatorPlugins = Any
2602
+ NavigatorStorage = Any
2603
+ NavigatorUA = Any
2604
+ NavigatorUserMediaErrorCallback = Any
2605
+ NavigatorUserMediaSuccessCallback = Any
2606
+ NodeFilter = Any
2607
+ NodeIterator = Any
2608
+ OffscreenCanvas = Any
2609
+ OnErrorEventHandler = Any
2610
+ OpenFilePickerOptions = Any
2611
+ Permissions = Any
2612
+ PermissionsPolicy = Any
2613
+ PictureInPictureWindow = Any
2614
+ PointerEventInit = Any
2615
+ PopStateEventInit = Any
2616
+ PortalHost = Any
2617
+ PositionCallback = Any
2618
+ PositionErrorCallback = Any
2619
+ PositionOptions = Any
2620
+ PredefinedColorSpace = Any
2621
+ Presentation = Any
2622
+ ProcessingInstruction = Any
2623
+ ProgressEventInit = Any
2624
+ QueryOptions = Any
2625
+ ReadableStream = Any
2626
+ ReferrerPolicy = Any
2627
+ RelatedApplication = Any
2628
+ RemotePlayback = Any
2629
+ RenderingContext = Any
2630
+ RequestCache = Any
2631
+ RequestCredentials = Any
2632
+ RequestDestination = Any
2633
+ RequestDuplex = Any
2634
+ RequestInfo = Any
2635
+ RequestInit = Any
2636
+ RequestMode = Any
2637
+ RequestRedirect = Any
2638
+ ResizeObserverCallback = Any
2639
+ ResizeObserverOptions = Any
2640
+ ResizeObserverSize = Any
2641
+ ResponseInit = Any
2642
+ ResponseType = Any
2643
+ SVGSVGElement = Any
2644
+ SaveFilePickerOptions = Any
2645
+ Scheduling = Any
2646
+ ScreenDetails = Any
2647
+ ScreenOrientation = Any
2648
+ ScrollIntoViewOptions = Any
2649
+ ScrollRestoration = Any
2650
+ ScrollToOptions = Any
2651
+ SelectionMode = Any
2652
+ Serial = Any
2653
+ ServiceWorkerContainer = Any
2654
+ SetHTMLOptions = Any
2655
+ ShadowRoot = Any
2656
+ ShadowRootInit = Any
2657
+ ShareData = Any
2658
+ SpatialNavigationDirection = Any
2659
+ SpatialNavigationSearchOptions = Any
2660
+ SpeechSynthesis = Any
2661
+ StaticRange = Any
2662
+ StorageEventInit = Any
2663
+ StylePropertyMap = Any
2664
+ StylePropertyMapReadOnly = Any
2665
+ StyleSheetList = Any
2666
+ SubmitEventInit = Any
2667
+ Text = Any
2668
+ TextTrack = Any
2669
+ TextTrackKind = Any
2670
+ TextTrackList = Any
2671
+ TimeRanges = Any
2672
+ TouchEventInit = Any
2673
+ TouchInit = Any
2674
+ TouchType = Any
2675
+ TransitionEventInit = Any
2676
+ TreeWalker = Any
2677
+ UIEventInit = Any
2678
+ USB = Any
2679
+ Uint8ClampedArray = Any
2680
+ UpdateCallback = Any
2681
+ UserActivation = Any
2682
+ ValidityState = Any
2683
+ VibratePattern = Any
2684
+ VideoFrameRequestCallback = Any
2685
+ VideoPlaybackQuality = Any
2686
+ VideoTrackList = Any
2687
+ ViewTransition = Any
2688
+ VirtualKeyboard = Any
2689
+ VisualViewport = Any
2690
+ WakeLock = Any
2691
+ WheelEventInit = Any
2692
+ WindowControlsOverlay = Any
2693
+ WindowEventHandlers = Any
2694
+ WindowLocalStorage = Any
2695
+ WindowOrWorkerGlobalScope = Any
2696
+ WindowPostMessageOptions = Any
2697
+ WindowProxy = Any
2698
+ WindowSessionStorage = Any
2699
+ XPathExpression = Any
2700
+ XPathNSResolver = Any
2701
+ XPathResult = Any
2702
+ XRSystem = Any
2703
+
2704
+
2705
+ # =============================================================================
2706
+ # Window module-level exports
2707
+ # =============================================================================
2708
+
2709
+ # The window object itself
2710
+ window: Window
2711
+ """The global window object. Equivalent to `self` in JavaScript."""
2712
+
2713
+ # Window properties exported as module-level attributes
2714
+ document: Document
2715
+ """The document associated with the window."""
2716
+
2717
+ location: Location
2718
+ """The location (URL) of the window."""
2719
+
2720
+ history: History
2721
+ """The browser's session history."""
2722
+
2723
+ navigator: Navigator
2724
+ """Information about the browser/user agent."""
2725
+
2726
+ localStorage: Storage
2727
+ """Storage that persists across browser sessions."""
2728
+
2729
+ sessionStorage: Storage
2730
+ """Storage that lasts for the duration of the page session."""
2731
+
2732
+ console: Console
2733
+ """The browser's debugging console."""
2734
+
2735
+ # Window dimensions
2736
+ innerWidth: int
2737
+ """The interior width of the window in pixels."""
2738
+
2739
+ innerHeight: int
2740
+ """The interior height of the window in pixels."""
2741
+
2742
+ outerWidth: int
2743
+ """The width of the outside of the browser window."""
2744
+
2745
+ outerHeight: int
2746
+ """The height of the outside of the browser window."""
2747
+
2748
+ # Scroll position
2749
+ scrollX: float
2750
+ """The number of pixels scrolled horizontally."""
2751
+
2752
+ scrollY: float
2753
+ """The number of pixels scrolled vertically."""
2754
+
2755
+ pageXOffset: float
2756
+ """Alias for scrollX."""
2757
+
2758
+ pageYOffset: float
2759
+ """Alias for scrollY."""
2760
+
2761
+ # Screen position
2762
+ screenX: int
2763
+ """The horizontal distance from the left screen edge."""
2764
+
2765
+ screenY: int
2766
+ """The vertical distance from the top screen edge."""
2767
+
2768
+ screenLeft: int
2769
+ """Alias for screenX."""
2770
+
2771
+ screenTop: int
2772
+ """Alias for screenY."""
2773
+
2774
+ # Device info
2775
+ devicePixelRatio: float
2776
+ """The ratio between physical pixels and CSS pixels."""
2777
+
2778
+ # Window state
2779
+ name: str
2780
+ """The name of the window."""
2781
+
2782
+ closed: bool
2783
+ """Whether the window has been closed."""
2784
+
2785
+
2786
+ # Window methods (commonly used)
2787
+ def alert(message: str = "") -> None:
2788
+ """Display an alert dialog."""
2789
+ ...
2790
+
2791
+
2792
+ def confirm(message: str = "") -> bool:
2793
+ """Display a confirmation dialog."""
2794
+ ...
2795
+
2796
+
2797
+ def prompt(message: str = "", default: str = "") -> str | None:
2798
+ """Display a prompt dialog."""
2799
+ ...
2800
+
2801
+
2802
+ def open(
2803
+ url: str = "",
2804
+ target: str = "_blank",
2805
+ features: str = "",
2806
+ ) -> object | None:
2807
+ """Open a new browser window."""
2808
+ ...
2809
+
2810
+
2811
+ def close() -> None:
2812
+ """Close the window."""
2813
+ ...
2814
+
2815
+
2816
+ def focus() -> None:
2817
+ """Focus the window."""
2818
+ ...
2819
+
2820
+
2821
+ def blur() -> None:
2822
+ """Remove focus from the window."""
2823
+ ...
2824
+
2825
+
2826
+ def scroll(x: float | dict[str, object], y: float | None = None) -> None:
2827
+ """Scroll to a position in the document."""
2828
+ ...
2829
+
2830
+
2831
+ def scrollTo(x: float | dict[str, object], y: float | None = None) -> None:
2832
+ """Scroll to a position in the document."""
2833
+ ...
2834
+
2835
+
2836
+ def scrollBy(x: float | dict[str, object], y: float | None = None) -> None:
2837
+ """Scroll by an amount."""
2838
+ ...
2839
+
2840
+
2841
+ def requestAnimationFrame(callback: object) -> int:
2842
+ """Request an animation frame callback."""
2843
+ ...
2844
+
2845
+
2846
+ def cancelAnimationFrame(handle: int) -> None:
2847
+ """Cancel an animation frame callback."""
2848
+ ...
2849
+
2850
+
2851
+ def setTimeout(callback: object, delay: int = 0, *args: object) -> int:
2852
+ """Set a timer to execute a callback."""
2853
+ ...
2854
+
2855
+
2856
+ def clearTimeout(id: int) -> None:
2857
+ """Clear a timer."""
2858
+ ...
2859
+
2860
+
2861
+ def setInterval(callback: object, delay: int = 0, *args: object) -> int:
2862
+ """Set a recurring timer."""
2863
+ ...
2864
+
2865
+
2866
+ def clearInterval(id: int) -> None:
2867
+ """Clear a recurring timer."""
2868
+ ...
2869
+
2870
+
2871
+ def fetch(input: str | object, init: dict[str, object] | None = None) -> object:
2872
+ """Fetch a resource from the network."""
2873
+ ...
2874
+
2875
+
2876
+ def getComputedStyle(elt: object, pseudoElt: str | None = None) -> object:
2877
+ """Get computed styles for an element."""
2878
+ ...
2879
+
2880
+
2881
+ def matchMedia(query: str) -> object:
2882
+ """Match a media query."""
2883
+ ...
2884
+
2885
+
2886
+ def atob(data: str) -> str:
2887
+ """Decode a base64-encoded string."""
2888
+ ...
2889
+
2890
+
2891
+ def btoa(data: str) -> str:
2892
+ """Encode a string to base64."""
2893
+ ...
2894
+
2895
+
2896
+ def postMessage(
2897
+ message: object, targetOrigin: str, transfer: list[object] | None = None
2898
+ ) -> None:
2899
+ """Post a message to another window."""
2900
+ ...
2901
+
2902
+
2903
+ def print() -> None:
2904
+ """Print the document."""
2905
+ ...
2906
+
2907
+
2908
+ def stop() -> None:
2909
+ """Stop loading the document."""
2910
+ ...
2911
+
2912
+
2913
+ def getSelection() -> object | None:
2914
+ """Get the current text selection."""
2915
+ ...
2916
+
2917
+
2918
+ # Allow access to any window property not explicitly defined above.
2919
+ # This handles dynamically loaded globals like jQuery, lodash, etc.
2920
+ def __getattr__(name: str) -> Any:
2921
+ """Access any window property by name.
2922
+
2923
+ The window object can have arbitrary properties, including:
2924
+ - Dynamically loaded libraries (jQuery, lodash, React, etc.)
2925
+ - Custom global variables set by JavaScript code
2926
+ - Browser-specific APIs not covered by the standard stubs
2927
+
2928
+ Example:
2929
+ from anvil.js.window import jQuery as _S
2930
+ _S("#my-element").hide()
2931
+ """
2932
+ ...