pulse-framework 0.1.74__tar.gz → 0.1.75__tar.gz
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.
- {pulse_framework-0.1.74 → pulse_framework-0.1.75}/PKG-INFO +1 -1
- {pulse_framework-0.1.74 → pulse_framework-0.1.75}/pyproject.toml +1 -1
- {pulse_framework-0.1.74 → pulse_framework-0.1.75}/src/pulse/js/__init__.py +36 -0
- {pulse_framework-0.1.74 → pulse_framework-0.1.75}/src/pulse/js/__init__.pyi +48 -0
- pulse_framework-0.1.75/src/pulse/js/abort_controller.py +61 -0
- pulse_framework-0.1.75/src/pulse/js/array_buffer.py +227 -0
- pulse_framework-0.1.75/src/pulse/js/blob.py +60 -0
- pulse_framework-0.1.75/src/pulse/js/crypto.py +69 -0
- pulse_framework-0.1.75/src/pulse/js/custom_event.py +49 -0
- pulse_framework-0.1.75/src/pulse/js/dom_parser.py +40 -0
- pulse_framework-0.1.75/src/pulse/js/fetch_api.py +126 -0
- pulse_framework-0.1.75/src/pulse/js/file.py +72 -0
- pulse_framework-0.1.75/src/pulse/js/file_reader.py +37 -0
- pulse_framework-0.1.75/src/pulse/js/form_data.py +58 -0
- pulse_framework-0.1.75/src/pulse/js/intersection_observer.py +79 -0
- pulse_framework-0.1.75/src/pulse/js/intl.py +101 -0
- pulse_framework-0.1.75/src/pulse/js/mutation_observer.py +87 -0
- pulse_framework-0.1.75/src/pulse/js/performance_observer.py +54 -0
- pulse_framework-0.1.75/src/pulse/js/resize_observer.py +55 -0
- pulse_framework-0.1.75/src/pulse/js/text_encoding.py +66 -0
- pulse_framework-0.1.75/src/pulse/js/url.py +114 -0
- {pulse_framework-0.1.74 → pulse_framework-0.1.75}/README.md +0 -0
- {pulse_framework-0.1.74 → pulse_framework-0.1.75}/src/pulse/__init__.py +0 -0
- {pulse_framework-0.1.74 → pulse_framework-0.1.75}/src/pulse/_examples.py +0 -0
- {pulse_framework-0.1.74 → pulse_framework-0.1.75}/src/pulse/app.py +0 -0
- {pulse_framework-0.1.74 → pulse_framework-0.1.75}/src/pulse/channel.py +0 -0
- {pulse_framework-0.1.74 → pulse_framework-0.1.75}/src/pulse/cli/__init__.py +0 -0
- {pulse_framework-0.1.74 → pulse_framework-0.1.75}/src/pulse/cli/cmd.py +0 -0
- {pulse_framework-0.1.74 → pulse_framework-0.1.75}/src/pulse/cli/dependencies.py +0 -0
- {pulse_framework-0.1.74 → pulse_framework-0.1.75}/src/pulse/cli/folder_lock.py +0 -0
- {pulse_framework-0.1.74 → pulse_framework-0.1.75}/src/pulse/cli/helpers.py +0 -0
- {pulse_framework-0.1.74 → pulse_framework-0.1.75}/src/pulse/cli/logging.py +0 -0
- {pulse_framework-0.1.74 → pulse_framework-0.1.75}/src/pulse/cli/models.py +0 -0
- {pulse_framework-0.1.74 → pulse_framework-0.1.75}/src/pulse/cli/packages.py +0 -0
- {pulse_framework-0.1.74 → pulse_framework-0.1.75}/src/pulse/cli/processes.py +0 -0
- {pulse_framework-0.1.74 → pulse_framework-0.1.75}/src/pulse/cli/secrets.py +0 -0
- {pulse_framework-0.1.74 → pulse_framework-0.1.75}/src/pulse/cli/uvicorn_log_config.py +0 -0
- {pulse_framework-0.1.74 → pulse_framework-0.1.75}/src/pulse/code_analysis.py +0 -0
- {pulse_framework-0.1.74 → pulse_framework-0.1.75}/src/pulse/codegen/__init__.py +0 -0
- {pulse_framework-0.1.74 → pulse_framework-0.1.75}/src/pulse/codegen/codegen.py +0 -0
- {pulse_framework-0.1.74 → pulse_framework-0.1.75}/src/pulse/codegen/templates/__init__.py +0 -0
- {pulse_framework-0.1.74 → pulse_framework-0.1.75}/src/pulse/codegen/templates/layout.py +0 -0
- {pulse_framework-0.1.74 → pulse_framework-0.1.75}/src/pulse/codegen/templates/route.py +0 -0
- {pulse_framework-0.1.74 → pulse_framework-0.1.75}/src/pulse/codegen/templates/routes_ts.py +0 -0
- {pulse_framework-0.1.74 → pulse_framework-0.1.75}/src/pulse/codegen/utils.py +0 -0
- {pulse_framework-0.1.74 → pulse_framework-0.1.75}/src/pulse/component.py +0 -0
- {pulse_framework-0.1.74 → pulse_framework-0.1.75}/src/pulse/components/__init__.py +0 -0
- {pulse_framework-0.1.74 → pulse_framework-0.1.75}/src/pulse/components/for_.py +0 -0
- {pulse_framework-0.1.74 → pulse_framework-0.1.75}/src/pulse/components/if_.py +0 -0
- {pulse_framework-0.1.74 → pulse_framework-0.1.75}/src/pulse/components/react_router.py +0 -0
- {pulse_framework-0.1.74 → pulse_framework-0.1.75}/src/pulse/context.py +0 -0
- {pulse_framework-0.1.74 → pulse_framework-0.1.75}/src/pulse/cookies.py +0 -0
- {pulse_framework-0.1.74 → pulse_framework-0.1.75}/src/pulse/debounce.py +0 -0
- {pulse_framework-0.1.74 → pulse_framework-0.1.75}/src/pulse/decorators.py +0 -0
- {pulse_framework-0.1.74 → pulse_framework-0.1.75}/src/pulse/dom/__init__.py +0 -0
- {pulse_framework-0.1.74 → pulse_framework-0.1.75}/src/pulse/dom/elements.py +0 -0
- {pulse_framework-0.1.74 → pulse_framework-0.1.75}/src/pulse/dom/events.py +0 -0
- {pulse_framework-0.1.74 → pulse_framework-0.1.75}/src/pulse/dom/props.py +0 -0
- {pulse_framework-0.1.74 → pulse_framework-0.1.75}/src/pulse/dom/svg.py +0 -0
- {pulse_framework-0.1.74 → pulse_framework-0.1.75}/src/pulse/dom/tags.py +0 -0
- {pulse_framework-0.1.74 → pulse_framework-0.1.75}/src/pulse/dom/tags.pyi +0 -0
- {pulse_framework-0.1.74 → pulse_framework-0.1.75}/src/pulse/env.py +0 -0
- {pulse_framework-0.1.74 → pulse_framework-0.1.75}/src/pulse/forms.py +0 -0
- {pulse_framework-0.1.74 → pulse_framework-0.1.75}/src/pulse/helpers.py +0 -0
- {pulse_framework-0.1.74 → pulse_framework-0.1.75}/src/pulse/hooks/__init__.py +0 -0
- {pulse_framework-0.1.74 → pulse_framework-0.1.75}/src/pulse/hooks/core.py +0 -0
- {pulse_framework-0.1.74 → pulse_framework-0.1.75}/src/pulse/hooks/effects.py +0 -0
- {pulse_framework-0.1.74 → pulse_framework-0.1.75}/src/pulse/hooks/init.py +0 -0
- {pulse_framework-0.1.74 → pulse_framework-0.1.75}/src/pulse/hooks/runtime.py +0 -0
- {pulse_framework-0.1.74 → pulse_framework-0.1.75}/src/pulse/hooks/setup.py +0 -0
- {pulse_framework-0.1.74 → pulse_framework-0.1.75}/src/pulse/hooks/stable.py +0 -0
- {pulse_framework-0.1.74 → pulse_framework-0.1.75}/src/pulse/hooks/state.py +0 -0
- {pulse_framework-0.1.74 → pulse_framework-0.1.75}/src/pulse/js/_types.py +0 -0
- {pulse_framework-0.1.74 → pulse_framework-0.1.75}/src/pulse/js/array.py +0 -0
- {pulse_framework-0.1.74 → pulse_framework-0.1.75}/src/pulse/js/console.py +0 -0
- {pulse_framework-0.1.74 → pulse_framework-0.1.75}/src/pulse/js/date.py +0 -0
- {pulse_framework-0.1.74 → pulse_framework-0.1.75}/src/pulse/js/document.py +0 -0
- {pulse_framework-0.1.74 → pulse_framework-0.1.75}/src/pulse/js/error.py +0 -0
- {pulse_framework-0.1.74 → pulse_framework-0.1.75}/src/pulse/js/json.py +0 -0
- {pulse_framework-0.1.74 → pulse_framework-0.1.75}/src/pulse/js/map.py +0 -0
- {pulse_framework-0.1.74 → pulse_framework-0.1.75}/src/pulse/js/math.py +0 -0
- {pulse_framework-0.1.74 → pulse_framework-0.1.75}/src/pulse/js/navigator.py +0 -0
- {pulse_framework-0.1.74 → pulse_framework-0.1.75}/src/pulse/js/number.py +0 -0
- {pulse_framework-0.1.74 → pulse_framework-0.1.75}/src/pulse/js/obj.py +0 -0
- {pulse_framework-0.1.74 → pulse_framework-0.1.75}/src/pulse/js/object.py +0 -0
- {pulse_framework-0.1.74 → pulse_framework-0.1.75}/src/pulse/js/promise.py +0 -0
- {pulse_framework-0.1.74 → pulse_framework-0.1.75}/src/pulse/js/pulse.py +0 -0
- {pulse_framework-0.1.74 → pulse_framework-0.1.75}/src/pulse/js/react.py +0 -0
- {pulse_framework-0.1.74 → pulse_framework-0.1.75}/src/pulse/js/regexp.py +0 -0
- {pulse_framework-0.1.74 → pulse_framework-0.1.75}/src/pulse/js/set.py +0 -0
- {pulse_framework-0.1.74 → pulse_framework-0.1.75}/src/pulse/js/string.py +0 -0
- {pulse_framework-0.1.74 → pulse_framework-0.1.75}/src/pulse/js/weakmap.py +0 -0
- {pulse_framework-0.1.74 → pulse_framework-0.1.75}/src/pulse/js/weakset.py +0 -0
- {pulse_framework-0.1.74 → pulse_framework-0.1.75}/src/pulse/js/window.py +0 -0
- {pulse_framework-0.1.74 → pulse_framework-0.1.75}/src/pulse/messages.py +0 -0
- {pulse_framework-0.1.74 → pulse_framework-0.1.75}/src/pulse/middleware.py +0 -0
- {pulse_framework-0.1.74 → pulse_framework-0.1.75}/src/pulse/plugin.py +0 -0
- {pulse_framework-0.1.74 → pulse_framework-0.1.75}/src/pulse/proxy.py +0 -0
- {pulse_framework-0.1.74 → pulse_framework-0.1.75}/src/pulse/py.typed +0 -0
- {pulse_framework-0.1.74 → pulse_framework-0.1.75}/src/pulse/queries/__init__.py +0 -0
- {pulse_framework-0.1.74 → pulse_framework-0.1.75}/src/pulse/queries/client.py +0 -0
- {pulse_framework-0.1.74 → pulse_framework-0.1.75}/src/pulse/queries/common.py +0 -0
- {pulse_framework-0.1.74 → pulse_framework-0.1.75}/src/pulse/queries/effect.py +0 -0
- {pulse_framework-0.1.74 → pulse_framework-0.1.75}/src/pulse/queries/infinite_query.py +0 -0
- {pulse_framework-0.1.74 → pulse_framework-0.1.75}/src/pulse/queries/mutation.py +0 -0
- {pulse_framework-0.1.74 → pulse_framework-0.1.75}/src/pulse/queries/protocol.py +0 -0
- {pulse_framework-0.1.74 → pulse_framework-0.1.75}/src/pulse/queries/query.py +0 -0
- {pulse_framework-0.1.74 → pulse_framework-0.1.75}/src/pulse/queries/store.py +0 -0
- {pulse_framework-0.1.74 → pulse_framework-0.1.75}/src/pulse/react_component.py +0 -0
- {pulse_framework-0.1.74 → pulse_framework-0.1.75}/src/pulse/reactive.py +0 -0
- {pulse_framework-0.1.74 → pulse_framework-0.1.75}/src/pulse/reactive_extensions.py +0 -0
- {pulse_framework-0.1.74 → pulse_framework-0.1.75}/src/pulse/render_session.py +0 -0
- {pulse_framework-0.1.74 → pulse_framework-0.1.75}/src/pulse/renderer.py +0 -0
- {pulse_framework-0.1.74 → pulse_framework-0.1.75}/src/pulse/request.py +0 -0
- {pulse_framework-0.1.74 → pulse_framework-0.1.75}/src/pulse/requirements.py +0 -0
- {pulse_framework-0.1.74 → pulse_framework-0.1.75}/src/pulse/routing.py +0 -0
- {pulse_framework-0.1.74 → pulse_framework-0.1.75}/src/pulse/scheduling.py +0 -0
- {pulse_framework-0.1.74 → pulse_framework-0.1.75}/src/pulse/serializer.py +0 -0
- {pulse_framework-0.1.74 → pulse_framework-0.1.75}/src/pulse/state/__init__.py +0 -0
- {pulse_framework-0.1.74 → pulse_framework-0.1.75}/src/pulse/state/property.py +0 -0
- {pulse_framework-0.1.74 → pulse_framework-0.1.75}/src/pulse/state/query_param.py +0 -0
- {pulse_framework-0.1.74 → pulse_framework-0.1.75}/src/pulse/state/state.py +0 -0
- {pulse_framework-0.1.74 → pulse_framework-0.1.75}/src/pulse/test_helpers.py +0 -0
- {pulse_framework-0.1.74 → pulse_framework-0.1.75}/src/pulse/transpiler/__init__.py +0 -0
- {pulse_framework-0.1.74 → pulse_framework-0.1.75}/src/pulse/transpiler/assets.py +0 -0
- {pulse_framework-0.1.74 → pulse_framework-0.1.75}/src/pulse/transpiler/builtins.py +0 -0
- {pulse_framework-0.1.74 → pulse_framework-0.1.75}/src/pulse/transpiler/dynamic_import.py +0 -0
- {pulse_framework-0.1.74 → pulse_framework-0.1.75}/src/pulse/transpiler/emit_context.py +0 -0
- {pulse_framework-0.1.74 → pulse_framework-0.1.75}/src/pulse/transpiler/errors.py +0 -0
- {pulse_framework-0.1.74 → pulse_framework-0.1.75}/src/pulse/transpiler/function.py +0 -0
- {pulse_framework-0.1.74 → pulse_framework-0.1.75}/src/pulse/transpiler/id.py +0 -0
- {pulse_framework-0.1.74 → pulse_framework-0.1.75}/src/pulse/transpiler/imports.py +0 -0
- {pulse_framework-0.1.74 → pulse_framework-0.1.75}/src/pulse/transpiler/js_module.py +0 -0
- {pulse_framework-0.1.74 → pulse_framework-0.1.75}/src/pulse/transpiler/modules/__init__.py +0 -0
- {pulse_framework-0.1.74 → pulse_framework-0.1.75}/src/pulse/transpiler/modules/asyncio.py +0 -0
- {pulse_framework-0.1.74 → pulse_framework-0.1.75}/src/pulse/transpiler/modules/json.py +0 -0
- {pulse_framework-0.1.74 → pulse_framework-0.1.75}/src/pulse/transpiler/modules/math.py +0 -0
- {pulse_framework-0.1.74 → pulse_framework-0.1.75}/src/pulse/transpiler/modules/pulse/__init__.py +0 -0
- {pulse_framework-0.1.74 → pulse_framework-0.1.75}/src/pulse/transpiler/modules/pulse/tags.py +0 -0
- {pulse_framework-0.1.74 → pulse_framework-0.1.75}/src/pulse/transpiler/modules/typing.py +0 -0
- {pulse_framework-0.1.74 → pulse_framework-0.1.75}/src/pulse/transpiler/nodes.py +0 -0
- {pulse_framework-0.1.74 → pulse_framework-0.1.75}/src/pulse/transpiler/parse.py +0 -0
- {pulse_framework-0.1.74 → pulse_framework-0.1.75}/src/pulse/transpiler/py_module.py +0 -0
- {pulse_framework-0.1.74 → pulse_framework-0.1.75}/src/pulse/transpiler/transpiler.py +0 -0
- {pulse_framework-0.1.74 → pulse_framework-0.1.75}/src/pulse/transpiler/vdom.py +0 -0
- {pulse_framework-0.1.74 → pulse_framework-0.1.75}/src/pulse/types/__init__.py +0 -0
- {pulse_framework-0.1.74 → pulse_framework-0.1.75}/src/pulse/types/event_handler.py +0 -0
- {pulse_framework-0.1.74 → pulse_framework-0.1.75}/src/pulse/user_session.py +0 -0
- {pulse_framework-0.1.74 → pulse_framework-0.1.75}/src/pulse/version.py +0 -0
|
@@ -52,10 +52,12 @@ from pulse.transpiler.nodes import UNDEFINED as _UNDEFINED
|
|
|
52
52
|
|
|
53
53
|
# Namespace modules - return JsModule from registry (handles both builtins and external)
|
|
54
54
|
_MODULE_EXPORTS_NAMESPACE: dict[str, str] = {
|
|
55
|
+
"Intl": "pulse.js.intl",
|
|
55
56
|
"JSON": "pulse.js.json",
|
|
56
57
|
"Math": "pulse.js.math",
|
|
57
58
|
"React": "pulse.js.react",
|
|
58
59
|
"console": "pulse.js.console",
|
|
60
|
+
"crypto": "pulse.js.crypto",
|
|
59
61
|
"window": "pulse.js.window",
|
|
60
62
|
"document": "pulse.js.document",
|
|
61
63
|
"navigator": "pulse.js.navigator",
|
|
@@ -63,18 +65,52 @@ _MODULE_EXPORTS_NAMESPACE: dict[str, str] = {
|
|
|
63
65
|
|
|
64
66
|
# Class modules - return via getattr to get Class wrapper (emits `new ...`)
|
|
65
67
|
_MODULE_EXPORTS_ATTRIBUTE: dict[str, str] = {
|
|
68
|
+
"AbortController": "pulse.js.abort_controller",
|
|
69
|
+
"AbortSignal": "pulse.js.abort_controller",
|
|
66
70
|
"Array": "pulse.js.array",
|
|
71
|
+
"ArrayBuffer": "pulse.js.array_buffer",
|
|
72
|
+
"BigInt64Array": "pulse.js.array_buffer",
|
|
73
|
+
"BigUint64Array": "pulse.js.array_buffer",
|
|
74
|
+
"Blob": "pulse.js.blob",
|
|
75
|
+
"CustomEvent": "pulse.js.custom_event",
|
|
76
|
+
"DOMParser": "pulse.js.dom_parser",
|
|
77
|
+
"DataView": "pulse.js.array_buffer",
|
|
67
78
|
"Date": "pulse.js.date",
|
|
68
79
|
"Error": "pulse.js.error",
|
|
80
|
+
"File": "pulse.js.file",
|
|
81
|
+
"FileReader": "pulse.js.file_reader",
|
|
82
|
+
"Float32Array": "pulse.js.array_buffer",
|
|
83
|
+
"Float64Array": "pulse.js.array_buffer",
|
|
84
|
+
"FormData": "pulse.js.form_data",
|
|
85
|
+
"Headers": "pulse.js.fetch_api",
|
|
86
|
+
"Int16Array": "pulse.js.array_buffer",
|
|
87
|
+
"Int32Array": "pulse.js.array_buffer",
|
|
88
|
+
"Int8Array": "pulse.js.array_buffer",
|
|
89
|
+
"IntersectionObserver": "pulse.js.intersection_observer",
|
|
69
90
|
"Map": "pulse.js.map",
|
|
91
|
+
"MutationObserver": "pulse.js.mutation_observer",
|
|
70
92
|
"Object": "pulse.js.object",
|
|
93
|
+
"PerformanceObserver": "pulse.js.performance_observer",
|
|
71
94
|
"Promise": "pulse.js.promise",
|
|
95
|
+
"Request": "pulse.js.fetch_api",
|
|
96
|
+
"ResizeObserver": "pulse.js.resize_observer",
|
|
97
|
+
"Response": "pulse.js.fetch_api",
|
|
72
98
|
"React": "pulse.js.react",
|
|
73
99
|
"RegExp": "pulse.js.regexp",
|
|
74
100
|
"Set": "pulse.js.set",
|
|
75
101
|
"String": "pulse.js.string",
|
|
102
|
+
"TextDecoder": "pulse.js.text_encoding",
|
|
103
|
+
"TextEncoder": "pulse.js.text_encoding",
|
|
104
|
+
"URL": "pulse.js.url",
|
|
105
|
+
"URLSearchParams": "pulse.js.url",
|
|
106
|
+
"Uint16Array": "pulse.js.array_buffer",
|
|
107
|
+
"Uint32Array": "pulse.js.array_buffer",
|
|
108
|
+
"Uint8Array": "pulse.js.array_buffer",
|
|
109
|
+
"Uint8ClampedArray": "pulse.js.array_buffer",
|
|
76
110
|
"WeakMap": "pulse.js.weakmap",
|
|
77
111
|
"WeakSet": "pulse.js.weakset",
|
|
112
|
+
"XMLSerializer": "pulse.js.dom_parser",
|
|
113
|
+
"fetch": "pulse.js.fetch_api",
|
|
78
114
|
"Number": "pulse.js.number",
|
|
79
115
|
}
|
|
80
116
|
|
|
@@ -8,7 +8,9 @@ from typing import Any as _Any
|
|
|
8
8
|
from typing import NoReturn as _NoReturn
|
|
9
9
|
|
|
10
10
|
import pulse.js.console
|
|
11
|
+
import pulse.js.crypto
|
|
11
12
|
import pulse.js.document
|
|
13
|
+
import pulse.js.intl
|
|
12
14
|
import pulse.js.json
|
|
13
15
|
import pulse.js.math
|
|
14
16
|
import pulse.js.navigator
|
|
@@ -63,10 +65,29 @@ from pulse.js._types import (
|
|
|
63
65
|
from pulse.js._types import (
|
|
64
66
|
Selection as Selection,
|
|
65
67
|
)
|
|
68
|
+
from pulse.js.abort_controller import AbortController as AbortController
|
|
69
|
+
from pulse.js.abort_controller import AbortSignal as AbortSignal
|
|
66
70
|
|
|
67
71
|
# Re-export classes with proper generic types
|
|
68
72
|
from pulse.js.array import Array as Array
|
|
73
|
+
from pulse.js.array_buffer import ArrayBuffer as ArrayBuffer
|
|
74
|
+
from pulse.js.array_buffer import BigInt64Array as BigInt64Array
|
|
75
|
+
from pulse.js.array_buffer import BigUint64Array as BigUint64Array
|
|
76
|
+
from pulse.js.array_buffer import DataView as DataView
|
|
77
|
+
from pulse.js.array_buffer import Float32Array as Float32Array
|
|
78
|
+
from pulse.js.array_buffer import Float64Array as Float64Array
|
|
79
|
+
from pulse.js.array_buffer import Int8Array as Int8Array
|
|
80
|
+
from pulse.js.array_buffer import Int16Array as Int16Array
|
|
81
|
+
from pulse.js.array_buffer import Int32Array as Int32Array
|
|
82
|
+
from pulse.js.array_buffer import Uint8Array as Uint8Array
|
|
83
|
+
from pulse.js.array_buffer import Uint8ClampedArray as Uint8ClampedArray
|
|
84
|
+
from pulse.js.array_buffer import Uint16Array as Uint16Array
|
|
85
|
+
from pulse.js.array_buffer import Uint32Array as Uint32Array
|
|
86
|
+
from pulse.js.blob import Blob as Blob
|
|
87
|
+
from pulse.js.custom_event import CustomEvent as CustomEvent
|
|
69
88
|
from pulse.js.date import Date as Date
|
|
89
|
+
from pulse.js.dom_parser import DOMParser as DOMParser
|
|
90
|
+
from pulse.js.dom_parser import XMLSerializer as XMLSerializer
|
|
70
91
|
from pulse.js.error import Error as Error
|
|
71
92
|
from pulse.js.error import EvalError as EvalError
|
|
72
93
|
from pulse.js.error import RangeError as RangeError
|
|
@@ -74,22 +95,44 @@ from pulse.js.error import ReferenceError as ReferenceError
|
|
|
74
95
|
from pulse.js.error import SyntaxError as SyntaxError
|
|
75
96
|
from pulse.js.error import TypeError as TypeError
|
|
76
97
|
from pulse.js.error import URIError as URIError
|
|
98
|
+
from pulse.js.fetch_api import Headers as Headers
|
|
99
|
+
from pulse.js.fetch_api import Request as Request
|
|
100
|
+
from pulse.js.fetch_api import Response as Response
|
|
101
|
+
from pulse.js.file import File as File
|
|
102
|
+
from pulse.js.file_reader import FileReader as FileReader
|
|
103
|
+
from pulse.js.form_data import FormData as FormData
|
|
104
|
+
from pulse.js.intersection_observer import IntersectionObserver as IntersectionObserver
|
|
77
105
|
from pulse.js.map import Map as Map
|
|
106
|
+
from pulse.js.mutation_observer import MutationObserver as MutationObserver
|
|
107
|
+
from pulse.js.mutation_observer import (
|
|
108
|
+
MutationObserverInit as MutationObserverInit,
|
|
109
|
+
)
|
|
110
|
+
from pulse.js.mutation_observer import (
|
|
111
|
+
MutationRecord as MutationRecord,
|
|
112
|
+
)
|
|
78
113
|
from pulse.js.number import Number as Number
|
|
79
114
|
from pulse.js.object import Object as Object
|
|
80
115
|
from pulse.js.object import PropertyDescriptor as PropertyDescriptor
|
|
116
|
+
from pulse.js.performance_observer import PerformanceObserver as PerformanceObserver
|
|
81
117
|
from pulse.js.promise import Promise as Promise
|
|
82
118
|
from pulse.js.promise import PromiseWithResolvers as PromiseWithResolvers
|
|
83
119
|
from pulse.js.regexp import RegExp as RegExp
|
|
120
|
+
from pulse.js.resize_observer import ResizeObserver as ResizeObserver
|
|
84
121
|
from pulse.js.set import Set as Set
|
|
85
122
|
from pulse.js.string import String as String
|
|
123
|
+
from pulse.js.text_encoding import TextDecoder as TextDecoder
|
|
124
|
+
from pulse.js.text_encoding import TextEncoder as TextEncoder
|
|
125
|
+
from pulse.js.url import URL as URL
|
|
126
|
+
from pulse.js.url import URLSearchParams as URLSearchParams
|
|
86
127
|
from pulse.js.weakmap import WeakMap as WeakMap
|
|
87
128
|
from pulse.js.weakset import WeakSet as WeakSet
|
|
88
129
|
from pulse.transpiler.nodes import Undefined
|
|
89
130
|
|
|
90
131
|
# Re-export namespace modules
|
|
91
132
|
console = pulse.js.console
|
|
133
|
+
crypto = pulse.js.crypto
|
|
92
134
|
document = pulse.js.document
|
|
135
|
+
Intl = pulse.js.intl
|
|
93
136
|
JSON = pulse.js.json
|
|
94
137
|
Math = pulse.js.math
|
|
95
138
|
navigator = pulse.js.navigator
|
|
@@ -111,5 +154,10 @@ def obj(**kwargs: _Any) -> _Any:
|
|
|
111
154
|
"""
|
|
112
155
|
...
|
|
113
156
|
|
|
157
|
+
# Global function bindings
|
|
158
|
+
def fetch(input: str | Request, init: _Any | None = None) -> _Any:
|
|
159
|
+
"""Fetch a resource."""
|
|
160
|
+
...
|
|
161
|
+
|
|
114
162
|
# Primitive values
|
|
115
163
|
undefined: Undefined
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
"""
|
|
2
|
+
JavaScript AbortController and AbortSignal builtins.
|
|
3
|
+
|
|
4
|
+
Usage:
|
|
5
|
+
|
|
6
|
+
```python
|
|
7
|
+
from pulse.js import AbortController
|
|
8
|
+
|
|
9
|
+
@ps.javascript
|
|
10
|
+
def example():
|
|
11
|
+
controller = AbortController()
|
|
12
|
+
signal = controller.signal
|
|
13
|
+
controller.abort()
|
|
14
|
+
```
|
|
15
|
+
"""
|
|
16
|
+
|
|
17
|
+
from collections.abc import Callable as _Callable
|
|
18
|
+
from typing import Any as _Any
|
|
19
|
+
|
|
20
|
+
from pulse.transpiler.js_module import JsModule
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
class AbortSignal:
|
|
24
|
+
"""Signal object used to abort async operations."""
|
|
25
|
+
|
|
26
|
+
@property
|
|
27
|
+
def aborted(self) -> bool: ...
|
|
28
|
+
|
|
29
|
+
@property
|
|
30
|
+
def onabort(self) -> _Callable[[_Any], _Any] | None: ...
|
|
31
|
+
|
|
32
|
+
def throwIfAborted(self) -> None: ...
|
|
33
|
+
|
|
34
|
+
def addEventListener(
|
|
35
|
+
self,
|
|
36
|
+
type: str,
|
|
37
|
+
listener: _Callable[..., None],
|
|
38
|
+
options: bool | dict[str, bool] | None = None,
|
|
39
|
+
/,
|
|
40
|
+
) -> None: ...
|
|
41
|
+
|
|
42
|
+
def removeEventListener(
|
|
43
|
+
self,
|
|
44
|
+
type: str,
|
|
45
|
+
listener: _Callable[..., None],
|
|
46
|
+
options: bool | dict[str, bool] | None = None,
|
|
47
|
+
/,
|
|
48
|
+
) -> None: ...
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
class AbortController:
|
|
52
|
+
"""Controller for creating and aborting AbortSignals."""
|
|
53
|
+
|
|
54
|
+
@property
|
|
55
|
+
def signal(self) -> AbortSignal: ...
|
|
56
|
+
|
|
57
|
+
def abort(self) -> None: ...
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
# Self-register this module as a JS builtin (global identifiers)
|
|
61
|
+
JsModule.register(name=None)
|
|
@@ -0,0 +1,227 @@
|
|
|
1
|
+
"""
|
|
2
|
+
JavaScript ArrayBuffer/DataView/TypedArray builtins.
|
|
3
|
+
|
|
4
|
+
Usage:
|
|
5
|
+
|
|
6
|
+
```python
|
|
7
|
+
from pulse.js import ArrayBuffer, Uint8Array
|
|
8
|
+
|
|
9
|
+
@ps.javascript
|
|
10
|
+
def example():
|
|
11
|
+
buf = ArrayBuffer(8)
|
|
12
|
+
view = Uint8Array(buf)
|
|
13
|
+
view[0] = 255
|
|
14
|
+
return buf.byteLength
|
|
15
|
+
```
|
|
16
|
+
"""
|
|
17
|
+
|
|
18
|
+
from typing import Any as _Any
|
|
19
|
+
from typing import ClassVar as _ClassVar
|
|
20
|
+
from typing import TypedDict as _TypedDict
|
|
21
|
+
|
|
22
|
+
from pulse.transpiler.js_module import JsModule
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
class ArrayBufferOptions(_TypedDict, total=False):
|
|
26
|
+
maxByteLength: int
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
class ArrayBuffer:
|
|
30
|
+
"""Fixed-length raw binary data buffer."""
|
|
31
|
+
|
|
32
|
+
def __init__(
|
|
33
|
+
self, length: int, options: ArrayBufferOptions | None = None, /
|
|
34
|
+
) -> None: ...
|
|
35
|
+
|
|
36
|
+
@property
|
|
37
|
+
def byteLength(self) -> int: ...
|
|
38
|
+
|
|
39
|
+
@property
|
|
40
|
+
def maxByteLength(self) -> int: ...
|
|
41
|
+
|
|
42
|
+
@property
|
|
43
|
+
def resizable(self) -> bool: ...
|
|
44
|
+
|
|
45
|
+
def slice(self, begin: int = 0, end: int | None = None, /) -> "ArrayBuffer": ...
|
|
46
|
+
|
|
47
|
+
@staticmethod
|
|
48
|
+
def isView(value: _Any, /) -> bool: ...
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
class DataView:
|
|
52
|
+
"""View for reading/writing multiple numeric types."""
|
|
53
|
+
|
|
54
|
+
def __init__(
|
|
55
|
+
self,
|
|
56
|
+
buffer: ArrayBuffer,
|
|
57
|
+
byteOffset: int = 0,
|
|
58
|
+
byteLength: int | None = None,
|
|
59
|
+
/,
|
|
60
|
+
) -> None: ...
|
|
61
|
+
|
|
62
|
+
@property
|
|
63
|
+
def buffer(self) -> ArrayBuffer: ...
|
|
64
|
+
|
|
65
|
+
@property
|
|
66
|
+
def byteLength(self) -> int: ...
|
|
67
|
+
|
|
68
|
+
@property
|
|
69
|
+
def byteOffset(self) -> int: ...
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
class _TypedArray:
|
|
73
|
+
"""Common TypedArray surface for typing."""
|
|
74
|
+
|
|
75
|
+
@property
|
|
76
|
+
def buffer(self) -> ArrayBuffer: ...
|
|
77
|
+
|
|
78
|
+
@property
|
|
79
|
+
def byteLength(self) -> int: ...
|
|
80
|
+
|
|
81
|
+
@property
|
|
82
|
+
def byteOffset(self) -> int: ...
|
|
83
|
+
|
|
84
|
+
@property
|
|
85
|
+
def length(self) -> int: ...
|
|
86
|
+
|
|
87
|
+
def set(self, source: _Any, offset: int | None = None, /) -> None: ...
|
|
88
|
+
|
|
89
|
+
def subarray(self, begin: int = 0, end: int | None = None, /) -> _Any: ...
|
|
90
|
+
|
|
91
|
+
def slice(self, begin: int = 0, end: int | None = None, /) -> _Any: ...
|
|
92
|
+
|
|
93
|
+
|
|
94
|
+
class Int8Array(_TypedArray):
|
|
95
|
+
BYTES_PER_ELEMENT: _ClassVar[int]
|
|
96
|
+
|
|
97
|
+
def __init__(
|
|
98
|
+
self,
|
|
99
|
+
data: _Any | None = None,
|
|
100
|
+
byteOffset: int | None = None,
|
|
101
|
+
length: int | None = None,
|
|
102
|
+
/,
|
|
103
|
+
) -> None: ...
|
|
104
|
+
|
|
105
|
+
|
|
106
|
+
class Uint8Array(_TypedArray):
|
|
107
|
+
BYTES_PER_ELEMENT: _ClassVar[int]
|
|
108
|
+
|
|
109
|
+
def __init__(
|
|
110
|
+
self,
|
|
111
|
+
data: _Any | None = None,
|
|
112
|
+
byteOffset: int | None = None,
|
|
113
|
+
length: int | None = None,
|
|
114
|
+
/,
|
|
115
|
+
) -> None: ...
|
|
116
|
+
|
|
117
|
+
|
|
118
|
+
class Uint8ClampedArray(_TypedArray):
|
|
119
|
+
BYTES_PER_ELEMENT: _ClassVar[int]
|
|
120
|
+
|
|
121
|
+
def __init__(
|
|
122
|
+
self,
|
|
123
|
+
data: _Any | None = None,
|
|
124
|
+
byteOffset: int | None = None,
|
|
125
|
+
length: int | None = None,
|
|
126
|
+
/,
|
|
127
|
+
) -> None: ...
|
|
128
|
+
|
|
129
|
+
|
|
130
|
+
class Int16Array(_TypedArray):
|
|
131
|
+
BYTES_PER_ELEMENT: _ClassVar[int]
|
|
132
|
+
|
|
133
|
+
def __init__(
|
|
134
|
+
self,
|
|
135
|
+
data: _Any | None = None,
|
|
136
|
+
byteOffset: int | None = None,
|
|
137
|
+
length: int | None = None,
|
|
138
|
+
/,
|
|
139
|
+
) -> None: ...
|
|
140
|
+
|
|
141
|
+
|
|
142
|
+
class Uint16Array(_TypedArray):
|
|
143
|
+
BYTES_PER_ELEMENT: _ClassVar[int]
|
|
144
|
+
|
|
145
|
+
def __init__(
|
|
146
|
+
self,
|
|
147
|
+
data: _Any | None = None,
|
|
148
|
+
byteOffset: int | None = None,
|
|
149
|
+
length: int | None = None,
|
|
150
|
+
/,
|
|
151
|
+
) -> None: ...
|
|
152
|
+
|
|
153
|
+
|
|
154
|
+
class Int32Array(_TypedArray):
|
|
155
|
+
BYTES_PER_ELEMENT: _ClassVar[int]
|
|
156
|
+
|
|
157
|
+
def __init__(
|
|
158
|
+
self,
|
|
159
|
+
data: _Any | None = None,
|
|
160
|
+
byteOffset: int | None = None,
|
|
161
|
+
length: int | None = None,
|
|
162
|
+
/,
|
|
163
|
+
) -> None: ...
|
|
164
|
+
|
|
165
|
+
|
|
166
|
+
class Uint32Array(_TypedArray):
|
|
167
|
+
BYTES_PER_ELEMENT: _ClassVar[int]
|
|
168
|
+
|
|
169
|
+
def __init__(
|
|
170
|
+
self,
|
|
171
|
+
data: _Any | None = None,
|
|
172
|
+
byteOffset: int | None = None,
|
|
173
|
+
length: int | None = None,
|
|
174
|
+
/,
|
|
175
|
+
) -> None: ...
|
|
176
|
+
|
|
177
|
+
|
|
178
|
+
class Float32Array(_TypedArray):
|
|
179
|
+
BYTES_PER_ELEMENT: _ClassVar[int]
|
|
180
|
+
|
|
181
|
+
def __init__(
|
|
182
|
+
self,
|
|
183
|
+
data: _Any | None = None,
|
|
184
|
+
byteOffset: int | None = None,
|
|
185
|
+
length: int | None = None,
|
|
186
|
+
/,
|
|
187
|
+
) -> None: ...
|
|
188
|
+
|
|
189
|
+
|
|
190
|
+
class Float64Array(_TypedArray):
|
|
191
|
+
BYTES_PER_ELEMENT: _ClassVar[int]
|
|
192
|
+
|
|
193
|
+
def __init__(
|
|
194
|
+
self,
|
|
195
|
+
data: _Any | None = None,
|
|
196
|
+
byteOffset: int | None = None,
|
|
197
|
+
length: int | None = None,
|
|
198
|
+
/,
|
|
199
|
+
) -> None: ...
|
|
200
|
+
|
|
201
|
+
|
|
202
|
+
class BigInt64Array(_TypedArray):
|
|
203
|
+
BYTES_PER_ELEMENT: _ClassVar[int]
|
|
204
|
+
|
|
205
|
+
def __init__(
|
|
206
|
+
self,
|
|
207
|
+
data: _Any | None = None,
|
|
208
|
+
byteOffset: int | None = None,
|
|
209
|
+
length: int | None = None,
|
|
210
|
+
/,
|
|
211
|
+
) -> None: ...
|
|
212
|
+
|
|
213
|
+
|
|
214
|
+
class BigUint64Array(_TypedArray):
|
|
215
|
+
BYTES_PER_ELEMENT: _ClassVar[int]
|
|
216
|
+
|
|
217
|
+
def __init__(
|
|
218
|
+
self,
|
|
219
|
+
data: _Any | None = None,
|
|
220
|
+
byteOffset: int | None = None,
|
|
221
|
+
length: int | None = None,
|
|
222
|
+
/,
|
|
223
|
+
) -> None: ...
|
|
224
|
+
|
|
225
|
+
|
|
226
|
+
# Self-register this module as a JS builtin (global identifiers)
|
|
227
|
+
JsModule.register(name=None)
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
"""
|
|
2
|
+
JavaScript Blob builtin.
|
|
3
|
+
|
|
4
|
+
Usage:
|
|
5
|
+
|
|
6
|
+
```python
|
|
7
|
+
from pulse.js import Blob, obj
|
|
8
|
+
|
|
9
|
+
@ps.javascript
|
|
10
|
+
def example():
|
|
11
|
+
blob = Blob(["hello"], obj(type="text/plain"))
|
|
12
|
+
return blob.size
|
|
13
|
+
```
|
|
14
|
+
"""
|
|
15
|
+
|
|
16
|
+
from typing import Any as _Any
|
|
17
|
+
from typing import TypedDict as _TypedDict
|
|
18
|
+
|
|
19
|
+
from pulse.transpiler.js_module import JsModule
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
class BlobPropertyBag(_TypedDict, total=False):
|
|
23
|
+
type: str
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
class Blob:
|
|
27
|
+
"""Binary large object."""
|
|
28
|
+
|
|
29
|
+
def __init__(
|
|
30
|
+
self,
|
|
31
|
+
blobParts: list[_Any] | None = None,
|
|
32
|
+
options: BlobPropertyBag | None = None,
|
|
33
|
+
/,
|
|
34
|
+
) -> None: ...
|
|
35
|
+
|
|
36
|
+
@property
|
|
37
|
+
def size(self) -> int: ...
|
|
38
|
+
|
|
39
|
+
@property
|
|
40
|
+
def type(self) -> str: ...
|
|
41
|
+
|
|
42
|
+
def arrayBuffer(self) -> _Any: ...
|
|
43
|
+
|
|
44
|
+
def bytes(self) -> _Any: ...
|
|
45
|
+
|
|
46
|
+
def slice(
|
|
47
|
+
self,
|
|
48
|
+
start: int | None = None,
|
|
49
|
+
end: int | None = None,
|
|
50
|
+
contentType: str | None = None,
|
|
51
|
+
/,
|
|
52
|
+
) -> "Blob": ...
|
|
53
|
+
|
|
54
|
+
def stream(self) -> _Any: ...
|
|
55
|
+
|
|
56
|
+
def text(self) -> _Any: ...
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
# Self-register this module as a JS builtin (global identifiers)
|
|
60
|
+
JsModule.register(name=None)
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
"""
|
|
2
|
+
JavaScript crypto namespace.
|
|
3
|
+
|
|
4
|
+
Usage:
|
|
5
|
+
|
|
6
|
+
```python
|
|
7
|
+
from pulse.js import crypto
|
|
8
|
+
|
|
9
|
+
@ps.javascript
|
|
10
|
+
def example():
|
|
11
|
+
buf = Uint8Array(16)
|
|
12
|
+
crypto.getRandomValues(buf)
|
|
13
|
+
return crypto.randomUUID()
|
|
14
|
+
```
|
|
15
|
+
"""
|
|
16
|
+
|
|
17
|
+
from typing import Any as _Any
|
|
18
|
+
from typing import Protocol as _Protocol
|
|
19
|
+
|
|
20
|
+
from pulse.transpiler.js_module import JsModule
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
class CryptoKey(_Protocol):
|
|
24
|
+
@property
|
|
25
|
+
def algorithm(self) -> _Any: ...
|
|
26
|
+
|
|
27
|
+
@property
|
|
28
|
+
def extractable(self) -> bool: ...
|
|
29
|
+
|
|
30
|
+
@property
|
|
31
|
+
def type(self) -> str: ...
|
|
32
|
+
|
|
33
|
+
@property
|
|
34
|
+
def usages(self) -> list[str]: ...
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
class SubtleCrypto(_Protocol):
|
|
38
|
+
def generateKey(
|
|
39
|
+
self, algorithm: _Any, extractable: bool, keyUsages: list[str], /
|
|
40
|
+
) -> _Any: ...
|
|
41
|
+
|
|
42
|
+
def importKey(
|
|
43
|
+
self,
|
|
44
|
+
format: str,
|
|
45
|
+
keyData: _Any,
|
|
46
|
+
algorithm: _Any,
|
|
47
|
+
extractable: bool,
|
|
48
|
+
keyUsages: list[str],
|
|
49
|
+
/,
|
|
50
|
+
) -> _Any: ...
|
|
51
|
+
|
|
52
|
+
def exportKey(self, format: str, key: CryptoKey, /) -> _Any: ...
|
|
53
|
+
|
|
54
|
+
def encrypt(self, algorithm: _Any, key: CryptoKey, data: _Any, /) -> _Any: ...
|
|
55
|
+
|
|
56
|
+
def decrypt(self, algorithm: _Any, key: CryptoKey, data: _Any, /) -> _Any: ...
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
subtle: SubtleCrypto
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
def getRandomValues(typedArray: _Any, /) -> _Any: ...
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
def randomUUID() -> str: ...
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
# Self-register this module as a JS builtin namespace
|
|
69
|
+
JsModule.register(name="crypto")
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
"""
|
|
2
|
+
JavaScript CustomEvent builtin.
|
|
3
|
+
|
|
4
|
+
Usage:
|
|
5
|
+
|
|
6
|
+
```python
|
|
7
|
+
from pulse.js import CustomEvent, obj
|
|
8
|
+
|
|
9
|
+
@ps.javascript
|
|
10
|
+
def example():
|
|
11
|
+
event = CustomEvent("my-event", obj(detail={"ok": True}))
|
|
12
|
+
return event.detail
|
|
13
|
+
```
|
|
14
|
+
"""
|
|
15
|
+
|
|
16
|
+
from typing import Any as _Any
|
|
17
|
+
from typing import TypedDict as _TypedDict
|
|
18
|
+
|
|
19
|
+
from pulse.transpiler.js_module import JsModule
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
class CustomEventInit(_TypedDict, total=False):
|
|
23
|
+
detail: _Any
|
|
24
|
+
bubbles: bool
|
|
25
|
+
cancelable: bool
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
class CustomEvent:
|
|
29
|
+
"""Custom event with a detail payload."""
|
|
30
|
+
|
|
31
|
+
def __init__(
|
|
32
|
+
self, type: str, eventInitDict: CustomEventInit | None = None, /
|
|
33
|
+
) -> None: ...
|
|
34
|
+
|
|
35
|
+
@property
|
|
36
|
+
def detail(self) -> _Any: ...
|
|
37
|
+
|
|
38
|
+
def initCustomEvent(
|
|
39
|
+
self,
|
|
40
|
+
type: str,
|
|
41
|
+
bubbles: bool | None = None,
|
|
42
|
+
cancelable: bool | None = None,
|
|
43
|
+
detail: _Any | None = None,
|
|
44
|
+
/,
|
|
45
|
+
) -> None: ...
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
# Self-register this module as a JS builtin (global identifiers)
|
|
49
|
+
JsModule.register(name=None)
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
"""
|
|
2
|
+
JavaScript DOMParser and XMLSerializer builtins.
|
|
3
|
+
|
|
4
|
+
Usage:
|
|
5
|
+
|
|
6
|
+
```python
|
|
7
|
+
from pulse.js import DOMParser, XMLSerializer
|
|
8
|
+
|
|
9
|
+
@ps.javascript
|
|
10
|
+
def example(source: str):
|
|
11
|
+
parser = DOMParser()
|
|
12
|
+
doc = parser.parseFromString(source, "text/html")
|
|
13
|
+
serializer = XMLSerializer()
|
|
14
|
+
return serializer.serializeToString(doc)
|
|
15
|
+
```
|
|
16
|
+
"""
|
|
17
|
+
|
|
18
|
+
from typing import Any as _Any
|
|
19
|
+
|
|
20
|
+
from pulse.transpiler.js_module import JsModule
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
class DOMParser:
|
|
24
|
+
"""Parses XML/HTML from strings."""
|
|
25
|
+
|
|
26
|
+
def __init__(self) -> None: ...
|
|
27
|
+
|
|
28
|
+
def parseFromString(self, string: str, mimeType: str, /) -> _Any: ...
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
class XMLSerializer:
|
|
32
|
+
"""Serializes DOM nodes to strings."""
|
|
33
|
+
|
|
34
|
+
def __init__(self) -> None: ...
|
|
35
|
+
|
|
36
|
+
def serializeToString(self, root: _Any, /) -> str: ...
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
# Self-register this module as a JS builtin (global identifiers)
|
|
40
|
+
JsModule.register(name=None)
|