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