├── .circleci └── config.yml ├── .gitignore ├── .pre-commit-config.yaml ├── CODE-OF-CONDUCT.md ├── GENERATION.md ├── LICENSE ├── README.md ├── generate_stub_file.py ├── js_pyi ├── .gitignore ├── __init__.py ├── assertions.py ├── clipboard.py ├── conversion.py ├── datamodel.py ├── fetch_webidls.py ├── ingest.py ├── itertools.py ├── main_print_dictionaries.py ├── main_print_overloaded.py ├── main_produce.py ├── main_unhandled.py ├── merge.py ├── produce.py ├── stringify.py ├── tee.py ├── w3c_webref │ └── ed │ │ ├── events.json │ │ ├── idl │ │ ├── ANGLE_instanced_arrays.idl │ │ ├── CSP.idl │ │ ├── DOM-Parsing.idl │ │ ├── EXT_blend_minmax.idl │ │ ├── EXT_clip_cull_distance.idl │ │ ├── EXT_color_buffer_float.idl │ │ ├── EXT_color_buffer_half_float.idl │ │ ├── EXT_disjoint_timer_query.idl │ │ ├── EXT_disjoint_timer_query_webgl2.idl │ │ ├── EXT_float_blend.idl │ │ ├── EXT_frag_depth.idl │ │ ├── EXT_sRGB.idl │ │ ├── EXT_shader_texture_lod.idl │ │ ├── EXT_texture_compression_bptc.idl │ │ ├── EXT_texture_compression_rgtc.idl │ │ ├── EXT_texture_filter_anisotropic.idl │ │ ├── EXT_texture_norm16.idl │ │ ├── FedCM.idl │ │ ├── FileAPI.idl │ │ ├── IndexedDB.idl │ │ ├── KHR_parallel_shader_compile.idl │ │ ├── OES_draw_buffers_indexed.idl │ │ ├── OES_element_index_uint.idl │ │ ├── OES_fbo_render_mipmap.idl │ │ ├── OES_standard_derivatives.idl │ │ ├── OES_texture_float.idl │ │ ├── OES_texture_float_linear.idl │ │ ├── OES_texture_half_float.idl │ │ ├── OES_texture_half_float_linear.idl │ │ ├── OES_vertex_array_object.idl │ │ ├── OVR_multiview2.idl │ │ ├── SVG.idl │ │ ├── WEBGL_blend_equation_advanced_coherent.idl │ │ ├── WEBGL_color_buffer_float.idl │ │ ├── WEBGL_compressed_texture_astc.idl │ │ ├── WEBGL_compressed_texture_etc.idl │ │ ├── WEBGL_compressed_texture_etc1.idl │ │ ├── WEBGL_compressed_texture_pvrtc.idl │ │ ├── WEBGL_compressed_texture_s3tc.idl │ │ ├── WEBGL_compressed_texture_s3tc_srgb.idl │ │ ├── WEBGL_debug_renderer_info.idl │ │ ├── WEBGL_debug_shaders.idl │ │ ├── WEBGL_depth_texture.idl │ │ ├── WEBGL_draw_buffers.idl │ │ ├── WEBGL_draw_instanced_base_vertex_base_instance.idl │ │ ├── WEBGL_lose_context.idl │ │ ├── WEBGL_multi_draw.idl │ │ ├── WEBGL_multi_draw_instanced_base_vertex_base_instance.idl │ │ ├── WebCryptoAPI.idl │ │ ├── accelerometer.idl │ │ ├── ambient-light.idl │ │ ├── anchors.idl │ │ ├── attribution-reporting-api.idl │ │ ├── audio-output.idl │ │ ├── autoplay-detection.idl │ │ ├── background-fetch.idl │ │ ├── background-sync.idl │ │ ├── badging.idl │ │ ├── battery-status.idl │ │ ├── beacon.idl │ │ ├── capture-handle-identity.idl │ │ ├── clipboard-apis.idl │ │ ├── close-watcher.idl │ │ ├── compat.idl │ │ ├── compression.idl │ │ ├── compute-pressure.idl │ │ ├── console.idl │ │ ├── contact-picker.idl │ │ ├── content-index.idl │ │ ├── cookie-store.idl │ │ ├── crash-reporting.idl │ │ ├── credential-management.idl │ │ ├── csp-embedded-enforcement.idl │ │ ├── csp-next.idl │ │ ├── css-animation-worklet.idl │ │ ├── css-animations-2.idl │ │ ├── css-animations.idl │ │ ├── css-cascade.idl │ │ ├── css-color-5.idl │ │ ├── css-conditional.idl │ │ ├── css-contain-3.idl │ │ ├── css-contain.idl │ │ ├── css-counter-styles.idl │ │ ├── css-font-loading.idl │ │ ├── css-fonts.idl │ │ ├── css-highlight-api.idl │ │ ├── css-images-4.idl │ │ ├── css-layout-api.idl │ │ ├── css-masking.idl │ │ ├── css-nav.idl │ │ ├── css-nesting.idl │ │ ├── css-paint-api.idl │ │ ├── css-parser-api.idl │ │ ├── css-properties-values-api.idl │ │ ├── css-pseudo.idl │ │ ├── css-regions.idl │ │ ├── css-shadow-parts.idl │ │ ├── css-transitions-2.idl │ │ ├── css-transitions.idl │ │ ├── css-typed-om.idl │ │ ├── css-view-transitions.idl │ │ ├── cssom-view.idl │ │ ├── cssom.idl │ │ ├── custom-state-pseudo-class.idl │ │ ├── datacue.idl │ │ ├── deprecation-reporting.idl │ │ ├── device-memory.idl │ │ ├── device-posture.idl │ │ ├── digital-goods.idl │ │ ├── dom.idl │ │ ├── edit-context.idl │ │ ├── element-timing.idl │ │ ├── encoding.idl │ │ ├── encrypted-media.idl │ │ ├── entries-api.idl │ │ ├── epub-rs.idl │ │ ├── event-timing.idl │ │ ├── eyedropper-api.idl │ │ ├── fetch.idl │ │ ├── fido.idl │ │ ├── file-system-access.idl │ │ ├── filter-effects.idl │ │ ├── font-metrics-api.idl │ │ ├── fs.idl │ │ ├── fullscreen.idl │ │ ├── gamepad-extensions.idl │ │ ├── gamepad.idl │ │ ├── generic-sensor.idl │ │ ├── geolocation-sensor.idl │ │ ├── geolocation.idl │ │ ├── geometry.idl │ │ ├── get-installed-related-apps.idl │ │ ├── gyroscope.idl │ │ ├── hr-time.idl │ │ ├── html-media-capture.idl │ │ ├── html.idl │ │ ├── idle-detection.idl │ │ ├── image-capture.idl │ │ ├── image-resource.idl │ │ ├── ink-enhancement.idl │ │ ├── input-device-capabilities.idl │ │ ├── input-events.idl │ │ ├── intersection-observer.idl │ │ ├── intervention-reporting.idl │ │ ├── is-input-pending.idl │ │ ├── js-self-profiling.idl │ │ ├── json-ld-api.idl │ │ ├── json-ld-framing.idl │ │ ├── keyboard-lock.idl │ │ ├── keyboard-map.idl │ │ ├── largest-contentful-paint.idl │ │ ├── layout-instability.idl │ │ ├── local-font-access.idl │ │ ├── longtasks.idl │ │ ├── magnetometer.idl │ │ ├── manifest-incubations.idl │ │ ├── mathml-core.idl │ │ ├── media-capabilities.idl │ │ ├── media-playback-quality.idl │ │ ├── media-source.idl │ │ ├── mediacapture-automation.idl │ │ ├── mediacapture-fromelement.idl │ │ ├── mediacapture-handle-actions.idl │ │ ├── mediacapture-region.idl │ │ ├── mediacapture-streams.idl │ │ ├── mediacapture-transform.idl │ │ ├── mediacapture-viewport.idl │ │ ├── mediasession.idl │ │ ├── mediastream-recording.idl │ │ ├── model-element.idl │ │ ├── mst-content-hint.idl │ │ ├── navigation-api.idl │ │ ├── navigation-timing.idl │ │ ├── netinfo.idl │ │ ├── notifications.idl │ │ ├── orientation-event.idl │ │ ├── orientation-sensor.idl │ │ ├── page-lifecycle.idl │ │ ├── paint-timing.idl │ │ ├── payment-handler.idl │ │ ├── payment-request.idl │ │ ├── performance-measure-memory.idl │ │ ├── performance-timeline.idl │ │ ├── periodic-background-sync.idl │ │ ├── permissions-policy.idl │ │ ├── permissions-request.idl │ │ ├── permissions-revoke.idl │ │ ├── permissions.idl │ │ ├── picture-in-picture.idl │ │ ├── pointerevents.idl │ │ ├── pointerlock.idl │ │ ├── portals.idl │ │ ├── prefer-current-tab.idl │ │ ├── prerendering-revamped.idl │ │ ├── presentation-api.idl │ │ ├── priority-hints.idl │ │ ├── private-click-measurement.idl │ │ ├── proximity.idl │ │ ├── push-api.idl │ │ ├── raw-camera-access.idl │ │ ├── referrer-policy.idl │ │ ├── remote-playback.idl │ │ ├── reporting.idl │ │ ├── requestidlecallback.idl │ │ ├── resize-observer.idl │ │ ├── resource-timing.idl │ │ ├── sanitizer-api.idl │ │ ├── savedata.idl │ │ ├── scheduling-apis.idl │ │ ├── screen-capture.idl │ │ ├── screen-orientation.idl │ │ ├── screen-wake-lock.idl │ │ ├── scroll-animations.idl │ │ ├── scroll-to-text-fragment.idl │ │ ├── secure-payment-confirmation.idl │ │ ├── selection-api.idl │ │ ├── serial.idl │ │ ├── server-timing.idl │ │ ├── service-workers.idl │ │ ├── shape-detection-api.idl │ │ ├── speech-api.idl │ │ ├── storage-access.idl │ │ ├── storage.idl │ │ ├── streams.idl │ │ ├── svg-animations.idl │ │ ├── testutils.idl │ │ ├── text-detection-api.idl │ │ ├── touch-events.idl │ │ ├── trusted-types.idl │ │ ├── ua-client-hints.idl │ │ ├── uievents.idl │ │ ├── url.idl │ │ ├── urlpattern.idl │ │ ├── user-timing.idl │ │ ├── vibration.idl │ │ ├── video-rvfc.idl │ │ ├── virtual-keyboard.idl │ │ ├── wai-aria.idl │ │ ├── wasm-js-api.idl │ │ ├── wasm-web-api.idl │ │ ├── web-animations-2.idl │ │ ├── web-animations.idl │ │ ├── web-app-launch.idl │ │ ├── web-bluetooth.idl │ │ ├── web-locks.idl │ │ ├── web-nfc.idl │ │ ├── web-otp.idl │ │ ├── web-share.idl │ │ ├── webaudio.idl │ │ ├── webauthn.idl │ │ ├── webcodecs-aac-codec-registration.idl │ │ ├── webcodecs-avc-codec-registration.idl │ │ ├── webcodecs-flac-codec-registration.idl │ │ ├── webcodecs-hevc-codec-registration.idl │ │ ├── webcodecs-opus-codec-registration.idl │ │ ├── webcodecs.idl │ │ ├── webcrypto-secure-curves.idl │ │ ├── webdriver.idl │ │ ├── webgl1.idl │ │ ├── webgl2.idl │ │ ├── webgpu.idl │ │ ├── webhid.idl │ │ ├── webidl.idl │ │ ├── webmidi.idl │ │ ├── webnn.idl │ │ ├── webrtc-encoded-transform.idl │ │ ├── webrtc-ice.idl │ │ ├── webrtc-identity.idl │ │ ├── webrtc-priority.idl │ │ ├── webrtc-stats.idl │ │ ├── webrtc-svc.idl │ │ ├── webrtc.idl │ │ ├── websockets.idl │ │ ├── webtransport.idl │ │ ├── webusb.idl │ │ ├── webvtt.idl │ │ ├── webxr-ar-module.idl │ │ ├── webxr-depth-sensing.idl │ │ ├── webxr-dom-overlays.idl │ │ ├── webxr-gamepads-module.idl │ │ ├── webxr-hand-input.idl │ │ ├── webxr-hit-test.idl │ │ ├── webxr-lighting-estimation.idl │ │ ├── webxr.idl │ │ ├── webxrlayers.idl │ │ ├── window-controls-overlay.idl │ │ ├── window-placement.idl │ │ └── xhr.idl │ │ ├── idlnames.json │ │ └── index.json ├── webidls-manual │ └── css-style-declaration.webidl └── webidls.py ├── pypi_helper.py ├── pypi_helper_test.py ├── pypi_inc_minor.py ├── pypi_upload.py ├── pyproject.toml ├── requirements.txt ├── src └── js-stubs │ └── __init__.pyi └── tests ├── __init__.py ├── ingest_stringify_test.py ├── merge_test.py ├── produce_test.py └── webidls_test.py /.circleci/config.yml: -------------------------------------------------------------------------------- 1 | version: '2.1' 2 | orbs: 3 | python: circleci/python@1.1.0 4 | jobs: 5 | build: 6 | executor: 7 | name: python/default 8 | tag: "3.11" 9 | steps: 10 | - checkout 11 | - python/install-packages: 12 | pip-dependency-file: requirements.txt 13 | pkg-manager: pip 14 | - run: 15 | name: Test 16 | command: | 17 | mkdir test-results 18 | pytest --junitxml=test-results/junit.xml --verbose --color=yes 19 | - store_test_results: 20 | path: test-results 21 | workflows: 22 | main: 23 | jobs: 24 | - build 25 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *.a 2 | *.o 3 | *.pyc 4 | *.gen.* 5 | src/js/*.out.* 6 | 7 | *.egg-info/ 8 | 9 | __pycache__ 10 | 11 | .docker_home 12 | .hypothesis 13 | .idea 14 | .mozilla 15 | .mypy_cache/ 16 | .pytest_cache/ 17 | .vscode 18 | .venv* 19 | 20 | build 21 | ccache 22 | cpython/downloads 23 | cpython/installs 24 | cpython/build.log 25 | dist/ 26 | docs/_build/ 27 | emsdk/emsdk 28 | geckodriver.log 29 | node_modules 30 | packages/.artifacts 31 | packages/.libs 32 | packages/*/build.log* 33 | packages/build-logs 34 | dist/ 35 | xbuildenv/ 36 | tools/symlinks 37 | xbuildenv/ 38 | .env -------------------------------------------------------------------------------- /.pre-commit-config.yaml: -------------------------------------------------------------------------------- 1 | ci: 2 | autoupdate_schedule: "quarterly" 3 | exclude: (^src.*$) 4 | default_language_version: 5 | python: "3.11" 6 | repos: 7 | - repo: https://github.com/psf/black 8 | rev: "24.10.0" 9 | hooks: 10 | - id: black 11 | -------------------------------------------------------------------------------- /GENERATION.md: -------------------------------------------------------------------------------- 1 | # Generation process 2 | 3 | The generator has three main phases: 4 | 5 | - ingest 6 | - merge 7 | - stringify 8 | 9 | The data-model classes represent a bridge between the webidl files and the final output: their 10 | shape and structure serve to facilitate the ingest phase and the stringify phase. 11 | 12 | ## Ingest 13 | 14 | This phase parses the `.webidl/.idl` files using the [webidl parser]([https://github.com/plinss/widlparser). 15 | The output this phase produces is the instances of the data-model dataclasses; these classes represent webidl entities 16 | and attributes in a more convenient way for further manipulation in the following phases. 17 | 18 | ## Merge 19 | 20 | Webidl can declare entities like 'partial interface', so it is possible to have multiple instances of the data-model related to the same type. 21 | This phase merges multiple instances of the same type into a single instance. 22 | 23 | ## Stringify 24 | 25 | This phase takes data-model instances and turns them into pieces of Python source code strings. 26 | This is the Python code that will be written to the `.pyi` file. 27 | Note that stringify is implemented on the data-model dataclass (through the method `to_python`), which is why the ingest tests also contain the stringify tests. 28 | -------------------------------------------------------------------------------- /generate_stub_file.py: -------------------------------------------------------------------------------- 1 | from pathlib import Path 2 | 3 | from js_pyi.main_produce import generate_python 4 | 5 | 6 | def main(): 7 | code = generate_python() 8 | path = Path(__file__).parent / "src/js-stubs/__init__.pyi" 9 | path.write_text(code) 10 | print(f"{len(code.splitlines())} lines written in {path}") 11 | 12 | 13 | if __name__ == "__main__": 14 | main() 15 | -------------------------------------------------------------------------------- /js_pyi/.gitignore: -------------------------------------------------------------------------------- 1 | web-sys 2 | tmp -------------------------------------------------------------------------------- /js_pyi/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pyodide/webtypy/f402468e5e3ec0747b6ed8948ea96639c2d9f766/js_pyi/__init__.py -------------------------------------------------------------------------------- /js_pyi/assertions.py: -------------------------------------------------------------------------------- 1 | from __future__ import annotations 2 | 3 | 4 | def unhandled(argument): 5 | raise Exception(f"unhandled type={type(argument)} `{argument}`") 6 | 7 | 8 | def expect_isinstance(instance, *any_of): 9 | if any(map(lambda et: isinstance(instance, et), any_of)): 10 | return 11 | raise Exception( 12 | f" expect instance to be `{any_of}` " 13 | f"but instead found to be `{type(instance)}`" 14 | ) 15 | -------------------------------------------------------------------------------- /js_pyi/clipboard.py: -------------------------------------------------------------------------------- 1 | import datetime 2 | import platform 3 | 4 | 5 | def clip_copy(data: str): 6 | system = platform.system() 7 | cmd = {"Linux": "xclip -sel c", "Darwin": "pbcopy"}.get(system, "") 8 | if cmd == "": 9 | raise Exception(f"System platform not supported {system}") 10 | _process(cmd, data) 11 | 12 | 13 | def _process(cmd: str, data: str): 14 | import shlex 15 | 16 | args = shlex.split(cmd) 17 | from subprocess import Popen, PIPE, STDOUT 18 | 19 | p = Popen(args, stdout=PIPE, stdin=PIPE, stderr=STDOUT) 20 | p.stdin.write(data.encode()) 21 | 22 | 23 | if __name__ == "__main__": 24 | clip_copy(f"ciao {datetime.datetime.now()}") 25 | -------------------------------------------------------------------------------- /js_pyi/conversion.py: -------------------------------------------------------------------------------- 1 | from __future__ import annotations 2 | 3 | _types_dict = { 4 | "undefined": "None", 5 | "any": "Any", 6 | "DOMString": "str", 7 | "long": "int", 8 | "long long": "int", 9 | "unsigned long": "int", 10 | "unsigned long long": "int", 11 | "unsigned short": "int", 12 | "boolean": "bool", 13 | "double": "float", 14 | "unrestricted double": "float", 15 | "unrestricted float": "float", 16 | # generics 17 | "sequence": "Sequence", 18 | "Promise": "Awaitable", 19 | } 20 | 21 | 22 | def to_py_type(s) -> str: 23 | return _types_dict.get(s, s) 24 | 25 | 26 | _values_dict = { 27 | "null": "None", 28 | } 29 | 30 | 31 | def to_py_value(s) -> str: 32 | return _values_dict.get(s, s) 33 | 34 | 35 | reserved_keywords = { 36 | "async", 37 | "from", 38 | "break", 39 | "is", 40 | "continue", 41 | "assert", 42 | "in", 43 | } 44 | 45 | 46 | def to_py_name(s) -> str: 47 | if s in reserved_keywords: 48 | return s + "_" 49 | return s 50 | -------------------------------------------------------------------------------- /js_pyi/fetch_webidls.py: -------------------------------------------------------------------------------- 1 | import os 2 | import shutil 3 | from pathlib import Path 4 | 5 | self_folder = Path(__file__).parent 6 | web_sys = self_folder / "web-sys" 7 | 8 | 9 | def main(): 10 | svn_websys_crate() 11 | copy_webidls() 12 | 13 | 14 | def svn_websys_crate(): 15 | print("running `svn export ...` this may take a while...") 16 | if web_sys.exists(): 17 | shutil.rmtree(web_sys) 18 | trunk = "https://github.com/rustwasm/wasm-bindgen/trunk" 19 | os.system(f"svn export {trunk}/crates/web-sys") 20 | licenses = ["LICENSE-APACHE", "LICENSE-MIT"] 21 | for licence in licenses: 22 | os.system( 23 | f"svn export {trunk}/{licence} web-sys/webidls" 24 | ) # get licence from the repo root 25 | 26 | 27 | def copy_webidls(): 28 | src = web_sys / "webidls" 29 | dst = self_folder / "webidls" 30 | if dst.exists(): 31 | shutil.rmtree(dst) 32 | shutil.copytree(src, dst) 33 | 34 | 35 | if __name__ == "__main__": 36 | main() 37 | -------------------------------------------------------------------------------- /js_pyi/itertools.py: -------------------------------------------------------------------------------- 1 | from __future__ import annotations 2 | 3 | from typing import Dict 4 | 5 | 6 | def groupby(iterable, key) -> Dict: 7 | result = dict() 8 | for item in iterable: 9 | k = key(item) 10 | array = result.get(k, None) 11 | if array is None: 12 | array = [] 13 | result[k] = array 14 | array.append(item) 15 | return result 16 | 17 | 18 | def partition(iterable, key): 19 | sx = [] 20 | dx = [] 21 | for item in iterable: 22 | if key(item): 23 | sx.append(item) 24 | else: 25 | dx.append(item) 26 | return sx, dx 27 | 28 | 29 | def remove_inplace(array, key): 30 | for idx in reversed(range(len(array))): 31 | st = array[idx] 32 | if key(st): 33 | del array[idx] 34 | -------------------------------------------------------------------------------- /js_pyi/main_print_dictionaries.py: -------------------------------------------------------------------------------- 1 | from __future__ import annotations 2 | 3 | from pathlib import Path 4 | from typing import List 5 | 6 | from js_pyi.datamodel import GUnhandled 7 | from js_pyi.ingest import ingest, keep_unhandled 8 | from js_pyi.webidls import find_all 9 | 10 | 11 | def print_dictionaries(files: List[Path] | None = None) -> bool: 12 | if files is None: 13 | files = find_all() 14 | 15 | for file in files: 16 | sts = ingest(file.read_text(), throw=False) 17 | sts = keep_unhandled(sts) 18 | for st in sts: 19 | if not isinstance(st, GUnhandled): 20 | continue 21 | if "dictionary " not in st.body_str: 22 | continue 23 | print("=" * 50) 24 | print(file) 25 | print("-" * 50) 26 | print(st.body_str) 27 | 28 | 29 | def main(): 30 | print_dictionaries() 31 | 32 | 33 | if __name__ == "__main__": 34 | main() 35 | -------------------------------------------------------------------------------- /js_pyi/main_produce.py: -------------------------------------------------------------------------------- 1 | from js_pyi.clipboard import clip_copy 2 | from js_pyi.produce import produce 3 | 4 | 5 | def generate_python(): 6 | return _head + produce() + _tail 7 | 8 | 9 | def main(): 10 | code = generate_python() 11 | print(code) 12 | clip_copy(code) 13 | 14 | 15 | _head = """# @formatter:off 16 | 17 | from typing import overload, Any, Awaitable, Sequence, Literal, TypedDict, NotRequired 18 | USVString = str 19 | 20 | 21 | """ 22 | _tail = """ 23 | 24 | document: Document 25 | window: Window 26 | navigator: Navigator 27 | console: ConsoleNamespace 28 | 29 | """ 30 | if __name__ == "__main__": 31 | main() 32 | -------------------------------------------------------------------------------- /js_pyi/main_unhandled.py: -------------------------------------------------------------------------------- 1 | from __future__ import annotations 2 | 3 | from pathlib import Path 4 | from typing import List 5 | 6 | from js_pyi.ingest import ingest, keep_unhandled 7 | from js_pyi.stringify import s_statements 8 | from js_pyi.webidls import find_all 9 | 10 | 11 | def unhandled(files: List[Path] | None = None) -> bool: 12 | if files is None: 13 | files = find_all() 14 | 15 | for file in files: 16 | sts = ingest(file.read_text(), throw=False) 17 | sts = keep_unhandled(sts) 18 | if len(sts) > 0: 19 | python_code = s_statements(sts) 20 | print("=" * 50) 21 | print(file) 22 | print("-" * 50) 23 | print(python_code) 24 | 25 | 26 | def main(): 27 | # develop([find('EventHandler.webidl')]) 28 | unhandled() 29 | 30 | 31 | if __name__ == "__main__": 32 | main() 33 | -------------------------------------------------------------------------------- /js_pyi/produce.py: -------------------------------------------------------------------------------- 1 | from __future__ import annotations 2 | 3 | import ast 4 | import traceback 5 | from pathlib import Path 6 | from typing import List 7 | 8 | from js_pyi.ingest import ingest, keep_python_producer 9 | from js_pyi.merge import merge 10 | from js_pyi.stringify import s_statements 11 | from js_pyi.webidls import find_all 12 | 13 | 14 | def produce(files: List[Path] | None = None) -> str: 15 | if files is None: 16 | files = find_all() 17 | 18 | statements = [] 19 | for file in files: 20 | sts = ingest(file.read_text(), throw=False) 21 | statements.extend(sts) 22 | 23 | statements = merge(statements) 24 | statements = keep_python_producer(statements) 25 | 26 | python_code = s_statements(statements) 27 | 28 | return python_code 29 | 30 | 31 | def parse_product() -> bool: 32 | exceptions = [] 33 | for file in find_all(): 34 | python_code = produce([file]) 35 | try: 36 | ast.parse(python_code) 37 | except Exception as ex: 38 | exceptions.append((file.name, traceback.format_exc(), python_code)) 39 | print() 40 | for file, ex, python_code in exceptions: 41 | print("=" * 50) 42 | print("file", file) 43 | print("-" * 50) 44 | print("exception", ex) 45 | print("-" * 50) 46 | print("full source") 47 | print(python_code) 48 | 49 | success = len(exceptions) == 0 50 | return success 51 | -------------------------------------------------------------------------------- /js_pyi/tee.py: -------------------------------------------------------------------------------- 1 | from io import StringIO 2 | from sys import stdout 3 | 4 | 5 | class Tee: 6 | def __init__(self, output=stdout): 7 | self.buf = StringIO() 8 | self.output = output 9 | 10 | def appendln(self, param): 11 | if self.output is not None: 12 | print(param, file=self.output) 13 | self.buf.write(param + "\n") 14 | 15 | def __str__(self): 16 | return self.buf.getvalue() 17 | -------------------------------------------------------------------------------- /js_pyi/w3c_webref/ed/idl/ANGLE_instanced_arrays.idl: -------------------------------------------------------------------------------- 1 | // GENERATED CONTENT - DO NOT EDIT 2 | // Content was automatically extracted by Reffy into webref 3 | // (https://github.com/w3c/webref) 4 | // Source: WebGL ANGLE_instanced_arrays Khronos Ratified Extension Specification (https://registry.khronos.org/webgl/extensions/ANGLE_instanced_arrays/) 5 | 6 | [Exposed=(Window,Worker), LegacyNoInterfaceObject] 7 | interface ANGLE_instanced_arrays { 8 | const GLenum VERTEX_ATTRIB_ARRAY_DIVISOR_ANGLE = 0x88FE; 9 | undefined drawArraysInstancedANGLE(GLenum mode, GLint first, GLsizei count, GLsizei primcount); 10 | undefined drawElementsInstancedANGLE(GLenum mode, GLsizei count, GLenum type, GLintptr offset, GLsizei primcount); 11 | undefined vertexAttribDivisorANGLE(GLuint index, GLuint divisor); 12 | }; 13 | -------------------------------------------------------------------------------- /js_pyi/w3c_webref/ed/idl/DOM-Parsing.idl: -------------------------------------------------------------------------------- 1 | // GENERATED CONTENT - DO NOT EDIT 2 | // Content was automatically extracted by Reffy into webref 3 | // (https://github.com/w3c/webref) 4 | // Source: DOM Parsing and Serialization (https://w3c.github.io/DOM-Parsing/) 5 | 6 | [Exposed=Window] 7 | interface XMLSerializer { 8 | constructor(); 9 | DOMString serializeToString(Node root); 10 | }; 11 | 12 | interface mixin InnerHTML { 13 | [CEReactions] attribute [LegacyNullToEmptyString] DOMString innerHTML; 14 | }; 15 | 16 | Element includes InnerHTML; 17 | ShadowRoot includes InnerHTML; 18 | 19 | partial interface Element { 20 | [CEReactions] attribute [LegacyNullToEmptyString] DOMString outerHTML; 21 | [CEReactions] undefined insertAdjacentHTML(DOMString position, DOMString text); 22 | }; 23 | 24 | partial interface Range { 25 | [CEReactions, NewObject] DocumentFragment createContextualFragment(DOMString fragment); 26 | }; 27 | -------------------------------------------------------------------------------- /js_pyi/w3c_webref/ed/idl/EXT_blend_minmax.idl: -------------------------------------------------------------------------------- 1 | // GENERATED CONTENT - DO NOT EDIT 2 | // Content was automatically extracted by Reffy into webref 3 | // (https://github.com/w3c/webref) 4 | // Source: WebGL EXT_blend_minmax Khronos Ratified Extension Specification (https://registry.khronos.org/webgl/extensions/EXT_blend_minmax/) 5 | 6 | [Exposed=(Window,Worker), LegacyNoInterfaceObject] 7 | interface EXT_blend_minmax { 8 | const GLenum MIN_EXT = 0x8007; 9 | const GLenum MAX_EXT = 0x8008; 10 | }; 11 | -------------------------------------------------------------------------------- /js_pyi/w3c_webref/ed/idl/EXT_clip_cull_distance.idl: -------------------------------------------------------------------------------- 1 | // GENERATED CONTENT - DO NOT EDIT 2 | // Content was automatically extracted by Reffy into webref 3 | // (https://github.com/w3c/webref) 4 | // Source: WebGL EXT_clip_cull_distance Extension Draft Specification (https://registry.khronos.org/webgl/extensions/EXT_clip_cull_distance/) 5 | 6 | [Exposed=(Window,Worker), LegacyNoInterfaceObject] 7 | interface EXT_clip_cull_distance { 8 | const GLenum MAX_CLIP_DISTANCES_EXT = 0x0D32; 9 | const GLenum MAX_CULL_DISTANCES_EXT = 0x82F9; 10 | const GLenum MAX_COMBINED_CLIP_AND_CULL_DISTANCES_EXT = 0x82FA; 11 | 12 | const GLenum CLIP_DISTANCE0_EXT = 0x3000; 13 | const GLenum CLIP_DISTANCE1_EXT = 0x3001; 14 | const GLenum CLIP_DISTANCE2_EXT = 0x3002; 15 | const GLenum CLIP_DISTANCE3_EXT = 0x3003; 16 | const GLenum CLIP_DISTANCE4_EXT = 0x3004; 17 | const GLenum CLIP_DISTANCE5_EXT = 0x3005; 18 | const GLenum CLIP_DISTANCE6_EXT = 0x3006; 19 | const GLenum CLIP_DISTANCE7_EXT = 0x3007; 20 | }; 21 | -------------------------------------------------------------------------------- /js_pyi/w3c_webref/ed/idl/EXT_color_buffer_float.idl: -------------------------------------------------------------------------------- 1 | // GENERATED CONTENT - DO NOT EDIT 2 | // Content was automatically extracted by Reffy into webref 3 | // (https://github.com/w3c/webref) 4 | // Source: WebGL EXT_color_buffer_float Extension Specification (https://registry.khronos.org/webgl/extensions/EXT_color_buffer_float/) 5 | 6 | [Exposed=(Window,Worker), LegacyNoInterfaceObject] 7 | interface EXT_color_buffer_float { 8 | }; // interface EXT_color_buffer_float 9 | -------------------------------------------------------------------------------- /js_pyi/w3c_webref/ed/idl/EXT_color_buffer_half_float.idl: -------------------------------------------------------------------------------- 1 | // GENERATED CONTENT - DO NOT EDIT 2 | // Content was automatically extracted by Reffy into webref 3 | // (https://github.com/w3c/webref) 4 | // Source: WebGL EXT_color_buffer_half_float Extension Specification (https://registry.khronos.org/webgl/extensions/EXT_color_buffer_half_float/) 5 | 6 | [Exposed=(Window,Worker), LegacyNoInterfaceObject] 7 | interface EXT_color_buffer_half_float { 8 | const GLenum RGBA16F_EXT = 0x881A; 9 | const GLenum RGB16F_EXT = 0x881B; 10 | const GLenum FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE_EXT = 0x8211; 11 | const GLenum UNSIGNED_NORMALIZED_EXT = 0x8C17; 12 | }; // interface EXT_color_buffer_half_float 13 | -------------------------------------------------------------------------------- /js_pyi/w3c_webref/ed/idl/EXT_disjoint_timer_query.idl: -------------------------------------------------------------------------------- 1 | // GENERATED CONTENT - DO NOT EDIT 2 | // Content was automatically extracted by Reffy into webref 3 | // (https://github.com/w3c/webref) 4 | // Source: WebGL EXT_disjoint_timer_query Extension Specification (https://registry.khronos.org/webgl/extensions/EXT_disjoint_timer_query/) 5 | 6 | typedef unsigned long long GLuint64EXT; 7 | 8 | [Exposed=(Window,Worker), LegacyNoInterfaceObject] 9 | interface WebGLTimerQueryEXT : WebGLObject { 10 | }; 11 | 12 | [Exposed=(Window,Worker), LegacyNoInterfaceObject] 13 | interface EXT_disjoint_timer_query { 14 | const GLenum QUERY_COUNTER_BITS_EXT = 0x8864; 15 | const GLenum CURRENT_QUERY_EXT = 0x8865; 16 | const GLenum QUERY_RESULT_EXT = 0x8866; 17 | const GLenum QUERY_RESULT_AVAILABLE_EXT = 0x8867; 18 | const GLenum TIME_ELAPSED_EXT = 0x88BF; 19 | const GLenum TIMESTAMP_EXT = 0x8E28; 20 | const GLenum GPU_DISJOINT_EXT = 0x8FBB; 21 | 22 | WebGLTimerQueryEXT? createQueryEXT(); 23 | undefined deleteQueryEXT(WebGLTimerQueryEXT? query); 24 | [WebGLHandlesContextLoss] boolean isQueryEXT(WebGLTimerQueryEXT? query); 25 | undefined beginQueryEXT(GLenum target, WebGLTimerQueryEXT query); 26 | undefined endQueryEXT(GLenum target); 27 | undefined queryCounterEXT(WebGLTimerQueryEXT query, GLenum target); 28 | any getQueryEXT(GLenum target, GLenum pname); 29 | any getQueryObjectEXT(WebGLTimerQueryEXT query, GLenum pname); 30 | }; 31 | -------------------------------------------------------------------------------- /js_pyi/w3c_webref/ed/idl/EXT_disjoint_timer_query_webgl2.idl: -------------------------------------------------------------------------------- 1 | // GENERATED CONTENT - DO NOT EDIT 2 | // Content was automatically extracted by Reffy into webref 3 | // (https://github.com/w3c/webref) 4 | // Source: WebGL EXT_disjoint_timer_query_webgl2 Extension Specification (https://registry.khronos.org/webgl/extensions/EXT_disjoint_timer_query_webgl2/) 5 | 6 | [Exposed=(Window,Worker), LegacyNoInterfaceObject] 7 | interface EXT_disjoint_timer_query_webgl2 { 8 | const GLenum QUERY_COUNTER_BITS_EXT = 0x8864; 9 | const GLenum TIME_ELAPSED_EXT = 0x88BF; 10 | const GLenum TIMESTAMP_EXT = 0x8E28; 11 | const GLenum GPU_DISJOINT_EXT = 0x8FBB; 12 | 13 | undefined queryCounterEXT(WebGLQuery query, GLenum target); 14 | }; 15 | -------------------------------------------------------------------------------- /js_pyi/w3c_webref/ed/idl/EXT_float_blend.idl: -------------------------------------------------------------------------------- 1 | // GENERATED CONTENT - DO NOT EDIT 2 | // Content was automatically extracted by Reffy into webref 3 | // (https://github.com/w3c/webref) 4 | // Source: WebGL EXT_float_blend Extension Specification (https://registry.khronos.org/webgl/extensions/EXT_float_blend/) 5 | 6 | [Exposed=(Window,Worker), LegacyNoInterfaceObject] 7 | interface EXT_float_blend { 8 | }; // interface EXT_float_blend 9 | -------------------------------------------------------------------------------- /js_pyi/w3c_webref/ed/idl/EXT_frag_depth.idl: -------------------------------------------------------------------------------- 1 | // GENERATED CONTENT - DO NOT EDIT 2 | // Content was automatically extracted by Reffy into webref 3 | // (https://github.com/w3c/webref) 4 | // Source: WebGL EXT_frag_depth Khronos Ratified Extension Specification (https://registry.khronos.org/webgl/extensions/EXT_frag_depth/) 5 | 6 | [Exposed=(Window,Worker), LegacyNoInterfaceObject] 7 | interface EXT_frag_depth { 8 | }; 9 | -------------------------------------------------------------------------------- /js_pyi/w3c_webref/ed/idl/EXT_sRGB.idl: -------------------------------------------------------------------------------- 1 | // GENERATED CONTENT - DO NOT EDIT 2 | // Content was automatically extracted by Reffy into webref 3 | // (https://github.com/w3c/webref) 4 | // Source: WebGL EXT_sRGB Extension Specification (https://registry.khronos.org/webgl/extensions/EXT_sRGB/) 5 | 6 | [Exposed=(Window,Worker), LegacyNoInterfaceObject] 7 | interface EXT_sRGB { 8 | const GLenum SRGB_EXT = 0x8C40; 9 | const GLenum SRGB_ALPHA_EXT = 0x8C42; 10 | const GLenum SRGB8_ALPHA8_EXT = 0x8C43; 11 | const GLenum FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING_EXT = 0x8210; 12 | }; 13 | -------------------------------------------------------------------------------- /js_pyi/w3c_webref/ed/idl/EXT_shader_texture_lod.idl: -------------------------------------------------------------------------------- 1 | // GENERATED CONTENT - DO NOT EDIT 2 | // Content was automatically extracted by Reffy into webref 3 | // (https://github.com/w3c/webref) 4 | // Source: WebGL EXT_shader_texture_lod Khronos Ratified Extension Specification (https://registry.khronos.org/webgl/extensions/EXT_shader_texture_lod/) 5 | 6 | [Exposed=(Window,Worker), LegacyNoInterfaceObject] 7 | interface EXT_shader_texture_lod { 8 | }; 9 | -------------------------------------------------------------------------------- /js_pyi/w3c_webref/ed/idl/EXT_texture_compression_bptc.idl: -------------------------------------------------------------------------------- 1 | // GENERATED CONTENT - DO NOT EDIT 2 | // Content was automatically extracted by Reffy into webref 3 | // (https://github.com/w3c/webref) 4 | // Source: WebGL EXT_texture_compression_bptc Extension Specification (https://registry.khronos.org/webgl/extensions/EXT_texture_compression_bptc/) 5 | 6 | [Exposed=(Window,Worker), LegacyNoInterfaceObject] 7 | interface EXT_texture_compression_bptc { 8 | const GLenum COMPRESSED_RGBA_BPTC_UNORM_EXT = 0x8E8C; 9 | const GLenum COMPRESSED_SRGB_ALPHA_BPTC_UNORM_EXT = 0x8E8D; 10 | const GLenum COMPRESSED_RGB_BPTC_SIGNED_FLOAT_EXT = 0x8E8E; 11 | const GLenum COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT_EXT = 0x8E8F; 12 | }; 13 | -------------------------------------------------------------------------------- /js_pyi/w3c_webref/ed/idl/EXT_texture_compression_rgtc.idl: -------------------------------------------------------------------------------- 1 | // GENERATED CONTENT - DO NOT EDIT 2 | // Content was automatically extracted by Reffy into webref 3 | // (https://github.com/w3c/webref) 4 | // Source: WebGL EXT_texture_compression_rgtc Extension Specification (https://registry.khronos.org/webgl/extensions/EXT_texture_compression_rgtc/) 5 | 6 | [Exposed=(Window,Worker), LegacyNoInterfaceObject] 7 | interface EXT_texture_compression_rgtc { 8 | const GLenum COMPRESSED_RED_RGTC1_EXT = 0x8DBB; 9 | const GLenum COMPRESSED_SIGNED_RED_RGTC1_EXT = 0x8DBC; 10 | const GLenum COMPRESSED_RED_GREEN_RGTC2_EXT = 0x8DBD; 11 | const GLenum COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT = 0x8DBE; 12 | }; 13 | -------------------------------------------------------------------------------- /js_pyi/w3c_webref/ed/idl/EXT_texture_filter_anisotropic.idl: -------------------------------------------------------------------------------- 1 | // GENERATED CONTENT - DO NOT EDIT 2 | // Content was automatically extracted by Reffy into webref 3 | // (https://github.com/w3c/webref) 4 | // Source: WebGL EXT_texture_filter_anisotropic Khronos Ratified Extension Specification (https://registry.khronos.org/webgl/extensions/EXT_texture_filter_anisotropic/) 5 | 6 | [Exposed=(Window,Worker), LegacyNoInterfaceObject] 7 | interface EXT_texture_filter_anisotropic { 8 | const GLenum TEXTURE_MAX_ANISOTROPY_EXT = 0x84FE; 9 | const GLenum MAX_TEXTURE_MAX_ANISOTROPY_EXT = 0x84FF; 10 | }; 11 | -------------------------------------------------------------------------------- /js_pyi/w3c_webref/ed/idl/EXT_texture_norm16.idl: -------------------------------------------------------------------------------- 1 | // GENERATED CONTENT - DO NOT EDIT 2 | // Content was automatically extracted by Reffy into webref 3 | // (https://github.com/w3c/webref) 4 | // Source: WebGL EXT_texture_norm16 Extension Specification (https://registry.khronos.org/webgl/extensions/EXT_texture_norm16/) 5 | 6 | [Exposed=(Window,Worker), LegacyNoInterfaceObject] 7 | interface EXT_texture_norm16 { 8 | const GLenum R16_EXT = 0x822A; 9 | const GLenum RG16_EXT = 0x822C; 10 | const GLenum RGB16_EXT = 0x8054; 11 | const GLenum RGBA16_EXT = 0x805B; 12 | const GLenum R16_SNORM_EXT = 0x8F98; 13 | const GLenum RG16_SNORM_EXT = 0x8F99; 14 | const GLenum RGB16_SNORM_EXT = 0x8F9A; 15 | const GLenum RGBA16_SNORM_EXT = 0x8F9B; 16 | }; 17 | -------------------------------------------------------------------------------- /js_pyi/w3c_webref/ed/idl/KHR_parallel_shader_compile.idl: -------------------------------------------------------------------------------- 1 | // GENERATED CONTENT - DO NOT EDIT 2 | // Content was automatically extracted by Reffy into webref 3 | // (https://github.com/w3c/webref) 4 | // Source: WebGL KHR_parallel_shader_compile Extension Specification (https://registry.khronos.org/webgl/extensions/KHR_parallel_shader_compile/) 5 | 6 | [Exposed=(Window,Worker), LegacyNoInterfaceObject] 7 | interface KHR_parallel_shader_compile { 8 | const GLenum COMPLETION_STATUS_KHR = 0x91B1; 9 | }; 10 | -------------------------------------------------------------------------------- /js_pyi/w3c_webref/ed/idl/OES_draw_buffers_indexed.idl: -------------------------------------------------------------------------------- 1 | // GENERATED CONTENT - DO NOT EDIT 2 | // Content was automatically extracted by Reffy into webref 3 | // (https://github.com/w3c/webref) 4 | // Source: WebGL OES_draw_buffers_indexed Extension Specification (https://registry.khronos.org/webgl/extensions/OES_draw_buffers_indexed/) 5 | 6 | [Exposed=(Window,Worker), LegacyNoInterfaceObject] 7 | interface OES_draw_buffers_indexed { 8 | undefined enableiOES(GLenum target, GLuint index); 9 | 10 | undefined disableiOES(GLenum target, GLuint index); 11 | 12 | undefined blendEquationiOES(GLuint buf, GLenum mode); 13 | 14 | undefined blendEquationSeparateiOES(GLuint buf, 15 | GLenum modeRGB, GLenum modeAlpha); 16 | 17 | undefined blendFunciOES(GLuint buf, 18 | GLenum src, GLenum dst); 19 | 20 | undefined blendFuncSeparateiOES(GLuint buf, 21 | GLenum srcRGB, GLenum dstRGB, 22 | GLenum srcAlpha, GLenum dstAlpha); 23 | 24 | undefined colorMaskiOES(GLuint buf, 25 | GLboolean r, GLboolean g, GLboolean b, GLboolean a); 26 | }; 27 | -------------------------------------------------------------------------------- /js_pyi/w3c_webref/ed/idl/OES_element_index_uint.idl: -------------------------------------------------------------------------------- 1 | // GENERATED CONTENT - DO NOT EDIT 2 | // Content was automatically extracted by Reffy into webref 3 | // (https://github.com/w3c/webref) 4 | // Source: WebGL OES_element_index_uint Khronos Ratified Extension Specification (https://registry.khronos.org/webgl/extensions/OES_element_index_uint/) 5 | 6 | [Exposed=(Window,Worker), LegacyNoInterfaceObject] 7 | interface OES_element_index_uint { 8 | }; 9 | -------------------------------------------------------------------------------- /js_pyi/w3c_webref/ed/idl/OES_fbo_render_mipmap.idl: -------------------------------------------------------------------------------- 1 | // GENERATED CONTENT - DO NOT EDIT 2 | // Content was automatically extracted by Reffy into webref 3 | // (https://github.com/w3c/webref) 4 | // Source: WebGL OES_fbo_render_mipmap Extension Specification (https://registry.khronos.org/webgl/extensions/OES_fbo_render_mipmap/) 5 | 6 | [Exposed=(Window,Worker), LegacyNoInterfaceObject] 7 | interface OES_fbo_render_mipmap { 8 | }; 9 | -------------------------------------------------------------------------------- /js_pyi/w3c_webref/ed/idl/OES_standard_derivatives.idl: -------------------------------------------------------------------------------- 1 | // GENERATED CONTENT - DO NOT EDIT 2 | // Content was automatically extracted by Reffy into webref 3 | // (https://github.com/w3c/webref) 4 | // Source: WebGL OES_standard_derivatives Khronos Ratified Extension Specification (https://registry.khronos.org/webgl/extensions/OES_standard_derivatives/) 5 | 6 | [Exposed=(Window,Worker), LegacyNoInterfaceObject] 7 | interface OES_standard_derivatives { 8 | const GLenum FRAGMENT_SHADER_DERIVATIVE_HINT_OES = 0x8B8B; 9 | }; 10 | -------------------------------------------------------------------------------- /js_pyi/w3c_webref/ed/idl/OES_texture_float.idl: -------------------------------------------------------------------------------- 1 | // GENERATED CONTENT - DO NOT EDIT 2 | // Content was automatically extracted by Reffy into webref 3 | // (https://github.com/w3c/webref) 4 | // Source: WebGL OES_texture_float Khronos Ratified Extension Specification (https://registry.khronos.org/webgl/extensions/OES_texture_float/) 5 | 6 | [Exposed=(Window,Worker), LegacyNoInterfaceObject] 7 | interface OES_texture_float { }; 8 | -------------------------------------------------------------------------------- /js_pyi/w3c_webref/ed/idl/OES_texture_float_linear.idl: -------------------------------------------------------------------------------- 1 | // GENERATED CONTENT - DO NOT EDIT 2 | // Content was automatically extracted by Reffy into webref 3 | // (https://github.com/w3c/webref) 4 | // Source: WebGL OES_texture_float_linear Khronos Ratified Extension Specification (https://registry.khronos.org/webgl/extensions/OES_texture_float_linear/) 5 | 6 | [Exposed=(Window,Worker), LegacyNoInterfaceObject] 7 | interface OES_texture_float_linear { }; 8 | -------------------------------------------------------------------------------- /js_pyi/w3c_webref/ed/idl/OES_texture_half_float.idl: -------------------------------------------------------------------------------- 1 | // GENERATED CONTENT - DO NOT EDIT 2 | // Content was automatically extracted by Reffy into webref 3 | // (https://github.com/w3c/webref) 4 | // Source: WebGL OES_texture_half_float Khronos Ratified Extension Specification (https://registry.khronos.org/webgl/extensions/OES_texture_half_float/) 5 | 6 | [Exposed=(Window,Worker), LegacyNoInterfaceObject] 7 | interface OES_texture_half_float { 8 | const GLenum HALF_FLOAT_OES = 0x8D61; 9 | }; 10 | -------------------------------------------------------------------------------- /js_pyi/w3c_webref/ed/idl/OES_texture_half_float_linear.idl: -------------------------------------------------------------------------------- 1 | // GENERATED CONTENT - DO NOT EDIT 2 | // Content was automatically extracted by Reffy into webref 3 | // (https://github.com/w3c/webref) 4 | // Source: WebGL OES_texture_half_float_linear Khronos Ratified Extension Specification (https://registry.khronos.org/webgl/extensions/OES_texture_half_float_linear/) 5 | 6 | [Exposed=(Window,Worker), LegacyNoInterfaceObject] 7 | interface OES_texture_half_float_linear { }; 8 | -------------------------------------------------------------------------------- /js_pyi/w3c_webref/ed/idl/OES_vertex_array_object.idl: -------------------------------------------------------------------------------- 1 | // GENERATED CONTENT - DO NOT EDIT 2 | // Content was automatically extracted by Reffy into webref 3 | // (https://github.com/w3c/webref) 4 | // Source: WebGL OES_vertex_array_object Khronos Ratified Extension Specification (https://registry.khronos.org/webgl/extensions/OES_vertex_array_object/) 5 | 6 | [Exposed=(Window,Worker), LegacyNoInterfaceObject] 7 | interface WebGLVertexArrayObjectOES : WebGLObject { 8 | }; 9 | 10 | [Exposed=(Window,Worker), LegacyNoInterfaceObject] 11 | interface OES_vertex_array_object { 12 | const GLenum VERTEX_ARRAY_BINDING_OES = 0x85B5; 13 | 14 | WebGLVertexArrayObjectOES? createVertexArrayOES(); 15 | undefined deleteVertexArrayOES(WebGLVertexArrayObjectOES? arrayObject); 16 | [WebGLHandlesContextLoss] GLboolean isVertexArrayOES(WebGLVertexArrayObjectOES? arrayObject); 17 | undefined bindVertexArrayOES(WebGLVertexArrayObjectOES? arrayObject); 18 | }; 19 | -------------------------------------------------------------------------------- /js_pyi/w3c_webref/ed/idl/OVR_multiview2.idl: -------------------------------------------------------------------------------- 1 | // GENERATED CONTENT - DO NOT EDIT 2 | // Content was automatically extracted by Reffy into webref 3 | // (https://github.com/w3c/webref) 4 | // Source: WebGL OVR_multiview2 Extension Specification (https://registry.khronos.org/webgl/extensions/OVR_multiview2/) 5 | 6 | [Exposed=(Window,Worker), LegacyNoInterfaceObject] 7 | interface OVR_multiview2 { 8 | const GLenum FRAMEBUFFER_ATTACHMENT_TEXTURE_NUM_VIEWS_OVR = 0x9630; 9 | const GLenum FRAMEBUFFER_ATTACHMENT_TEXTURE_BASE_VIEW_INDEX_OVR = 0x9632; 10 | const GLenum MAX_VIEWS_OVR = 0x9631; 11 | const GLenum FRAMEBUFFER_INCOMPLETE_VIEW_TARGETS_OVR = 0x9633; 12 | 13 | undefined framebufferTextureMultiviewOVR(GLenum target, GLenum attachment, WebGLTexture? texture, GLint level, GLint baseViewIndex, GLsizei numViews); 14 | }; 15 | -------------------------------------------------------------------------------- /js_pyi/w3c_webref/ed/idl/WEBGL_blend_equation_advanced_coherent.idl: -------------------------------------------------------------------------------- 1 | // GENERATED CONTENT - DO NOT EDIT 2 | // Content was automatically extracted by Reffy into webref 3 | // (https://github.com/w3c/webref) 4 | // Source: WebGL WEBGL_blend_equation_advanced_coherent Extension Draft Specification (https://registry.khronos.org/webgl/extensions/WEBGL_blend_equation_advanced_coherent/) 5 | 6 | [Exposed=(Window,Worker), LegacyNoInterfaceObject] 7 | interface WEBGL_blend_equation_advanced_coherent { 8 | const GLenum MULTIPLY = 0x9294; 9 | const GLenum SCREEN = 0x9295; 10 | const GLenum OVERLAY = 0x9296; 11 | const GLenum DARKEN = 0x9297; 12 | const GLenum LIGHTEN = 0x9298; 13 | const GLenum COLORDODGE = 0x9299; 14 | const GLenum COLORBURN = 0x929A; 15 | const GLenum HARDLIGHT = 0x929B; 16 | const GLenum SOFTLIGHT = 0x929C; 17 | const GLenum DIFFERENCE = 0x929E; 18 | const GLenum EXCLUSION = 0x92A0; 19 | const GLenum HSL_HUE = 0x92AD; 20 | const GLenum HSL_SATURATION = 0x92AE; 21 | const GLenum HSL_COLOR = 0x92AF; 22 | const GLenum HSL_LUMINOSITY = 0x92B0; 23 | }; 24 | -------------------------------------------------------------------------------- /js_pyi/w3c_webref/ed/idl/WEBGL_color_buffer_float.idl: -------------------------------------------------------------------------------- 1 | // GENERATED CONTENT - DO NOT EDIT 2 | // Content was automatically extracted by Reffy into webref 3 | // (https://github.com/w3c/webref) 4 | // Source: WebGL WEBGL_color_buffer_float Extension Specification (https://registry.khronos.org/webgl/extensions/WEBGL_color_buffer_float/) 5 | 6 | [Exposed=(Window,Worker), LegacyNoInterfaceObject] 7 | interface WEBGL_color_buffer_float { 8 | const GLenum RGBA32F_EXT = 0x8814; 9 | const GLenum FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE_EXT = 0x8211; 10 | const GLenum UNSIGNED_NORMALIZED_EXT = 0x8C17; 11 | }; // interface WEBGL_color_buffer_float 12 | -------------------------------------------------------------------------------- /js_pyi/w3c_webref/ed/idl/WEBGL_compressed_texture_etc.idl: -------------------------------------------------------------------------------- 1 | // GENERATED CONTENT - DO NOT EDIT 2 | // Content was automatically extracted by Reffy into webref 3 | // (https://github.com/w3c/webref) 4 | // Source: WebGL WEBGL_compressed_texture_etc Extension Specification (https://registry.khronos.org/webgl/extensions/WEBGL_compressed_texture_etc/) 5 | 6 | [Exposed=(Window,Worker), LegacyNoInterfaceObject] 7 | interface WEBGL_compressed_texture_etc { 8 | /* Compressed Texture Formats */ 9 | const GLenum COMPRESSED_R11_EAC = 0x9270; 10 | const GLenum COMPRESSED_SIGNED_R11_EAC = 0x9271; 11 | const GLenum COMPRESSED_RG11_EAC = 0x9272; 12 | const GLenum COMPRESSED_SIGNED_RG11_EAC = 0x9273; 13 | const GLenum COMPRESSED_RGB8_ETC2 = 0x9274; 14 | const GLenum COMPRESSED_SRGB8_ETC2 = 0x9275; 15 | const GLenum COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2 = 0x9276; 16 | const GLenum COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2 = 0x9277; 17 | const GLenum COMPRESSED_RGBA8_ETC2_EAC = 0x9278; 18 | const GLenum COMPRESSED_SRGB8_ALPHA8_ETC2_EAC = 0x9279; 19 | }; 20 | -------------------------------------------------------------------------------- /js_pyi/w3c_webref/ed/idl/WEBGL_compressed_texture_etc1.idl: -------------------------------------------------------------------------------- 1 | // GENERATED CONTENT - DO NOT EDIT 2 | // Content was automatically extracted by Reffy into webref 3 | // (https://github.com/w3c/webref) 4 | // Source: WebGL WEBGL_compressed_texture_etc1 Extension Specification (https://registry.khronos.org/webgl/extensions/WEBGL_compressed_texture_etc1/) 5 | 6 | [Exposed=(Window,Worker), LegacyNoInterfaceObject] 7 | interface WEBGL_compressed_texture_etc1 { 8 | /* Compressed Texture Format */ 9 | const GLenum COMPRESSED_RGB_ETC1_WEBGL = 0x8D64; 10 | }; 11 | -------------------------------------------------------------------------------- /js_pyi/w3c_webref/ed/idl/WEBGL_compressed_texture_pvrtc.idl: -------------------------------------------------------------------------------- 1 | // GENERATED CONTENT - DO NOT EDIT 2 | // Content was automatically extracted by Reffy into webref 3 | // (https://github.com/w3c/webref) 4 | // Source: WebGL WEBGL_compressed_texture_pvrtc Extension Specification (https://registry.khronos.org/webgl/extensions/WEBGL_compressed_texture_pvrtc/) 5 | 6 | [Exposed=(Window,Worker), LegacyNoInterfaceObject] 7 | interface WEBGL_compressed_texture_pvrtc { 8 | /* Compressed Texture Formats */ 9 | const GLenum COMPRESSED_RGB_PVRTC_4BPPV1_IMG = 0x8C00; 10 | const GLenum COMPRESSED_RGB_PVRTC_2BPPV1_IMG = 0x8C01; 11 | const GLenum COMPRESSED_RGBA_PVRTC_4BPPV1_IMG = 0x8C02; 12 | const GLenum COMPRESSED_RGBA_PVRTC_2BPPV1_IMG = 0x8C03; 13 | }; 14 | -------------------------------------------------------------------------------- /js_pyi/w3c_webref/ed/idl/WEBGL_compressed_texture_s3tc.idl: -------------------------------------------------------------------------------- 1 | // GENERATED CONTENT - DO NOT EDIT 2 | // Content was automatically extracted by Reffy into webref 3 | // (https://github.com/w3c/webref) 4 | // Source: WebGL WEBGL_compressed_texture_s3tc Khronos Ratified Extension Specification (https://registry.khronos.org/webgl/extensions/WEBGL_compressed_texture_s3tc/) 5 | 6 | [Exposed=(Window,Worker), LegacyNoInterfaceObject] 7 | interface WEBGL_compressed_texture_s3tc { 8 | /* Compressed Texture Formats */ 9 | const GLenum COMPRESSED_RGB_S3TC_DXT1_EXT = 0x83F0; 10 | const GLenum COMPRESSED_RGBA_S3TC_DXT1_EXT = 0x83F1; 11 | const GLenum COMPRESSED_RGBA_S3TC_DXT3_EXT = 0x83F2; 12 | const GLenum COMPRESSED_RGBA_S3TC_DXT5_EXT = 0x83F3; 13 | }; 14 | -------------------------------------------------------------------------------- /js_pyi/w3c_webref/ed/idl/WEBGL_compressed_texture_s3tc_srgb.idl: -------------------------------------------------------------------------------- 1 | // GENERATED CONTENT - DO NOT EDIT 2 | // Content was automatically extracted by Reffy into webref 3 | // (https://github.com/w3c/webref) 4 | // Source: WebGL WEBGL_compressed_texture_s3tc_srgb Extension Specification (https://registry.khronos.org/webgl/extensions/WEBGL_compressed_texture_s3tc_srgb/) 5 | 6 | [Exposed=(Window,Worker), LegacyNoInterfaceObject] 7 | interface WEBGL_compressed_texture_s3tc_srgb { 8 | /* Compressed Texture Formats */ 9 | const GLenum COMPRESSED_SRGB_S3TC_DXT1_EXT = 0x8C4C; 10 | const GLenum COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT = 0x8C4D; 11 | const GLenum COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT = 0x8C4E; 12 | const GLenum COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT = 0x8C4F; 13 | }; 14 | -------------------------------------------------------------------------------- /js_pyi/w3c_webref/ed/idl/WEBGL_debug_renderer_info.idl: -------------------------------------------------------------------------------- 1 | // GENERATED CONTENT - DO NOT EDIT 2 | // Content was automatically extracted by Reffy into webref 3 | // (https://github.com/w3c/webref) 4 | // Source: WebGL WEBGL_debug_renderer_info Khronos Ratified Extension Specification (https://registry.khronos.org/webgl/extensions/WEBGL_debug_renderer_info/) 5 | 6 | [Exposed=(Window,Worker), LegacyNoInterfaceObject] 7 | interface WEBGL_debug_renderer_info { 8 | 9 | const GLenum UNMASKED_VENDOR_WEBGL = 0x9245; 10 | const GLenum UNMASKED_RENDERER_WEBGL = 0x9246; 11 | 12 | }; 13 | -------------------------------------------------------------------------------- /js_pyi/w3c_webref/ed/idl/WEBGL_debug_shaders.idl: -------------------------------------------------------------------------------- 1 | // GENERATED CONTENT - DO NOT EDIT 2 | // Content was automatically extracted by Reffy into webref 3 | // (https://github.com/w3c/webref) 4 | // Source: WebGL WEBGL_debug_shaders Khronos Ratified Extension Specification (https://registry.khronos.org/webgl/extensions/WEBGL_debug_shaders/) 5 | 6 | [Exposed=(Window,Worker), LegacyNoInterfaceObject] 7 | interface WEBGL_debug_shaders { 8 | 9 | DOMString getTranslatedShaderSource(WebGLShader shader); 10 | 11 | }; 12 | -------------------------------------------------------------------------------- /js_pyi/w3c_webref/ed/idl/WEBGL_depth_texture.idl: -------------------------------------------------------------------------------- 1 | // GENERATED CONTENT - DO NOT EDIT 2 | // Content was automatically extracted by Reffy into webref 3 | // (https://github.com/w3c/webref) 4 | // Source: WebGL WEBGL_depth_texture Khronos Ratified Extension Specification (https://registry.khronos.org/webgl/extensions/WEBGL_depth_texture/) 5 | 6 | [Exposed=(Window,Worker), LegacyNoInterfaceObject] 7 | interface WEBGL_depth_texture { 8 | const GLenum UNSIGNED_INT_24_8_WEBGL = 0x84FA; 9 | }; 10 | -------------------------------------------------------------------------------- /js_pyi/w3c_webref/ed/idl/WEBGL_draw_instanced_base_vertex_base_instance.idl: -------------------------------------------------------------------------------- 1 | // GENERATED CONTENT - DO NOT EDIT 2 | // Content was automatically extracted by Reffy into webref 3 | // (https://github.com/w3c/webref) 4 | // Source: WebGL WEBGL_draw_instanced_base_vertex_base_instance Extension Draft Specification (https://registry.khronos.org/webgl/extensions/WEBGL_draw_instanced_base_vertex_base_instance/) 5 | 6 | [Exposed=(Window,Worker), LegacyNoInterfaceObject] 7 | interface WEBGL_draw_instanced_base_vertex_base_instance { 8 | undefined drawArraysInstancedBaseInstanceWEBGL( 9 | GLenum mode, GLint first, GLsizei count, 10 | GLsizei instanceCount, GLuint baseInstance); 11 | undefined drawElementsInstancedBaseVertexBaseInstanceWEBGL( 12 | GLenum mode, GLsizei count, GLenum type, GLintptr offset, 13 | GLsizei instanceCount, GLint baseVertex, GLuint baseInstance); 14 | }; 15 | -------------------------------------------------------------------------------- /js_pyi/w3c_webref/ed/idl/WEBGL_lose_context.idl: -------------------------------------------------------------------------------- 1 | // GENERATED CONTENT - DO NOT EDIT 2 | // Content was automatically extracted by Reffy into webref 3 | // (https://github.com/w3c/webref) 4 | // Source: WebGL WEBGL_lose_context Khronos Ratified Extension Specification (https://registry.khronos.org/webgl/extensions/WEBGL_lose_context/) 5 | 6 | [Exposed=(Window,Worker), LegacyNoInterfaceObject] 7 | interface WEBGL_lose_context { 8 | undefined loseContext(); 9 | undefined restoreContext(); 10 | }; 11 | -------------------------------------------------------------------------------- /js_pyi/w3c_webref/ed/idl/WEBGL_multi_draw.idl: -------------------------------------------------------------------------------- 1 | // GENERATED CONTENT - DO NOT EDIT 2 | // Content was automatically extracted by Reffy into webref 3 | // (https://github.com/w3c/webref) 4 | // Source: WebGL WEBGL_multi_draw Extension Specification (https://registry.khronos.org/webgl/extensions/WEBGL_multi_draw/) 5 | 6 | [Exposed=(Window,Worker), LegacyNoInterfaceObject] 7 | interface WEBGL_multi_draw { 8 | undefined multiDrawArraysWEBGL( 9 | GLenum mode, 10 | ([AllowShared] Int32Array or sequence) firstsList, GLuint firstsOffset, 11 | ([AllowShared] Int32Array or sequence) countsList, GLuint countsOffset, 12 | GLsizei drawcount); 13 | undefined multiDrawElementsWEBGL( 14 | GLenum mode, 15 | ([AllowShared] Int32Array or sequence) countsList, GLuint countsOffset, 16 | GLenum type, 17 | ([AllowShared] Int32Array or sequence) offsetsList, GLuint offsetsOffset, 18 | GLsizei drawcount); 19 | undefined multiDrawArraysInstancedWEBGL( 20 | GLenum mode, 21 | ([AllowShared] Int32Array or sequence) firstsList, GLuint firstsOffset, 22 | ([AllowShared] Int32Array or sequence) countsList, GLuint countsOffset, 23 | ([AllowShared] Int32Array or sequence) instanceCountsList, GLuint instanceCountsOffset, 24 | GLsizei drawcount); 25 | undefined multiDrawElementsInstancedWEBGL( 26 | GLenum mode, 27 | ([AllowShared] Int32Array or sequence) countsList, GLuint countsOffset, 28 | GLenum type, 29 | ([AllowShared] Int32Array or sequence) offsetsList, GLuint offsetsOffset, 30 | ([AllowShared] Int32Array or sequence) instanceCountsList, GLuint instanceCountsOffset, 31 | GLsizei drawcount); 32 | }; 33 | -------------------------------------------------------------------------------- /js_pyi/w3c_webref/ed/idl/WEBGL_multi_draw_instanced_base_vertex_base_instance.idl: -------------------------------------------------------------------------------- 1 | // GENERATED CONTENT - DO NOT EDIT 2 | // Content was automatically extracted by Reffy into webref 3 | // (https://github.com/w3c/webref) 4 | // Source: WebGL WEBGL_multi_draw_instanced_base_vertex_base_instance Extension Draft Specification (https://registry.khronos.org/webgl/extensions/WEBGL_multi_draw_instanced_base_vertex_base_instance/) 5 | 6 | [Exposed=(Window,Worker), LegacyNoInterfaceObject] 7 | interface WEBGL_multi_draw_instanced_base_vertex_base_instance { 8 | undefined multiDrawArraysInstancedBaseInstanceWEBGL( 9 | GLenum mode, 10 | ([AllowShared] Int32Array or sequence) firstsList, GLuint firstsOffset, 11 | ([AllowShared] Int32Array or sequence) countsList, GLuint countsOffset, 12 | ([AllowShared] Int32Array or sequence) instanceCountsList, GLuint instanceCountsOffset, 13 | ([AllowShared] Uint32Array or sequence) baseInstancesList, GLuint baseInstancesOffset, 14 | GLsizei drawcount 15 | ); 16 | undefined multiDrawElementsInstancedBaseVertexBaseInstanceWEBGL( 17 | GLenum mode, 18 | ([AllowShared] Int32Array or sequence) countsList, GLuint countsOffset, 19 | GLenum type, 20 | ([AllowShared] Int32Array or sequence) offsetsList, GLuint offsetsOffset, 21 | ([AllowShared] Int32Array or sequence) instanceCountsList, GLuint instanceCountsOffset, 22 | ([AllowShared] Int32Array or sequence) baseVerticesList, GLuint baseVerticesOffset, 23 | ([AllowShared] Uint32Array or sequence) baseInstancesList, GLuint baseInstancesOffset, 24 | GLsizei drawcount 25 | ); 26 | }; 27 | -------------------------------------------------------------------------------- /js_pyi/w3c_webref/ed/idl/accelerometer.idl: -------------------------------------------------------------------------------- 1 | // GENERATED CONTENT - DO NOT EDIT 2 | // Content was automatically extracted by Reffy into webref 3 | // (https://github.com/w3c/webref) 4 | // Source: Accelerometer (https://w3c.github.io/accelerometer/) 5 | 6 | [SecureContext, Exposed=Window] 7 | interface Accelerometer : Sensor { 8 | constructor(optional AccelerometerSensorOptions options = {}); 9 | readonly attribute double? x; 10 | readonly attribute double? y; 11 | readonly attribute double? z; 12 | }; 13 | 14 | enum AccelerometerLocalCoordinateSystem { "device", "screen" }; 15 | 16 | dictionary AccelerometerSensorOptions : SensorOptions { 17 | AccelerometerLocalCoordinateSystem referenceFrame = "device"; 18 | }; 19 | 20 | [SecureContext, Exposed=Window] 21 | interface LinearAccelerationSensor : Accelerometer { 22 | constructor(optional AccelerometerSensorOptions options = {}); 23 | }; 24 | 25 | [SecureContext, Exposed=Window] 26 | interface GravitySensor : Accelerometer { 27 | constructor(optional AccelerometerSensorOptions options = {}); 28 | }; 29 | 30 | dictionary AccelerometerReadingValues { 31 | required double? x; 32 | required double? y; 33 | required double? z; 34 | }; 35 | 36 | dictionary LinearAccelerationReadingValues : AccelerometerReadingValues { 37 | }; 38 | 39 | dictionary GravityReadingValues : AccelerometerReadingValues { 40 | }; 41 | -------------------------------------------------------------------------------- /js_pyi/w3c_webref/ed/idl/ambient-light.idl: -------------------------------------------------------------------------------- 1 | // GENERATED CONTENT - DO NOT EDIT 2 | // Content was automatically extracted by Reffy into webref 3 | // (https://github.com/w3c/webref) 4 | // Source: Ambient Light Sensor (https://w3c.github.io/ambient-light/) 5 | 6 | [SecureContext, Exposed=Window] 7 | interface AmbientLightSensor : Sensor { 8 | constructor(optional SensorOptions sensorOptions = {}); 9 | readonly attribute double? illuminance; 10 | }; 11 | 12 | dictionary AmbientLightReadingValues { 13 | required double? illuminance; 14 | }; 15 | -------------------------------------------------------------------------------- /js_pyi/w3c_webref/ed/idl/anchors.idl: -------------------------------------------------------------------------------- 1 | // GENERATED CONTENT - DO NOT EDIT 2 | // Content was automatically extracted by Reffy into webref 3 | // (https://github.com/w3c/webref) 4 | // Source: WebXR Anchors Module (https://immersive-web.github.io/anchors/) 5 | 6 | [SecureContext, Exposed=Window] 7 | interface XRAnchor { 8 | readonly attribute XRSpace anchorSpace; 9 | 10 | Promise requestPersistentHandle(); 11 | 12 | undefined delete(); 13 | }; 14 | 15 | partial interface XRFrame { 16 | Promise createAnchor(XRRigidTransform pose, XRSpace space); 17 | }; 18 | 19 | partial interface XRSession { 20 | Promise restorePersistentAnchor(DOMString uuid); 21 | Promise deletePersistentAnchor(DOMString uuid); 22 | }; 23 | 24 | partial interface XRHitTestResult { 25 | Promise createAnchor(); 26 | }; 27 | 28 | [Exposed=Window] 29 | interface XRAnchorSet { 30 | readonly setlike; 31 | }; 32 | 33 | partial interface XRFrame { 34 | [SameObject] readonly attribute XRAnchorSet trackedAnchors; 35 | }; 36 | -------------------------------------------------------------------------------- /js_pyi/w3c_webref/ed/idl/attribution-reporting-api.idl: -------------------------------------------------------------------------------- 1 | // GENERATED CONTENT - DO NOT EDIT 2 | // Content was automatically extracted by Reffy into webref 3 | // (https://github.com/w3c/webref) 4 | // Source: Attribution Reporting (https://wicg.github.io/attribution-reporting-api/) 5 | 6 | interface mixin HTMLAttributionSrcElementUtils { 7 | [CEReactions] attribute USVString attributionSrc; 8 | }; 9 | 10 | HTMLAnchorElement includes HTMLAttributionSrcElementUtils; 11 | HTMLImageElement includes HTMLAttributionSrcElementUtils; 12 | HTMLScriptElement includes HTMLAttributionSrcElementUtils; 13 | -------------------------------------------------------------------------------- /js_pyi/w3c_webref/ed/idl/audio-output.idl: -------------------------------------------------------------------------------- 1 | // GENERATED CONTENT - DO NOT EDIT 2 | // Content was automatically extracted by Reffy into webref 3 | // (https://github.com/w3c/webref) 4 | // Source: Audio Output Devices API (https://w3c.github.io/mediacapture-output/) 5 | 6 | partial interface HTMLMediaElement { 7 | [SecureContext] readonly attribute DOMString sinkId; 8 | [SecureContext] Promise setSinkId (DOMString sinkId); 9 | }; 10 | 11 | partial interface MediaDevices { 12 | Promise selectAudioOutput(optional AudioOutputOptions options = {}); 13 | }; 14 | 15 | dictionary AudioOutputOptions { 16 | DOMString deviceId = ""; 17 | }; 18 | -------------------------------------------------------------------------------- /js_pyi/w3c_webref/ed/idl/autoplay-detection.idl: -------------------------------------------------------------------------------- 1 | // GENERATED CONTENT - DO NOT EDIT 2 | // Content was automatically extracted by Reffy into webref 3 | // (https://github.com/w3c/webref) 4 | // Source: Autoplay Policy Detection (https://w3c.github.io/autoplay/) 5 | 6 | enum AutoplayPolicy { 7 | "allowed", 8 | "allowed-muted", 9 | "disallowed" 10 | }; 11 | 12 | enum AutoplayPolicyMediaType { "mediaelement", "audiocontext" }; 13 | 14 | [Exposed=Window] 15 | partial interface Navigator { 16 | AutoplayPolicy getAutoplayPolicy(AutoplayPolicyMediaType type); 17 | AutoplayPolicy getAutoplayPolicy(HTMLMediaElement element); 18 | AutoplayPolicy getAutoplayPolicy(AudioContext context); 19 | }; 20 | -------------------------------------------------------------------------------- /js_pyi/w3c_webref/ed/idl/background-sync.idl: -------------------------------------------------------------------------------- 1 | // GENERATED CONTENT - DO NOT EDIT 2 | // Content was automatically extracted by Reffy into webref 3 | // (https://github.com/w3c/webref) 4 | // Source: Web Background Synchronization (https://wicg.github.io/background-sync/spec/) 5 | 6 | partial interface ServiceWorkerRegistration { 7 | readonly attribute SyncManager sync; 8 | }; 9 | 10 | [Exposed=(Window,Worker)] 11 | interface SyncManager { 12 | Promise register(DOMString tag); 13 | Promise> getTags(); 14 | }; 15 | 16 | partial interface ServiceWorkerGlobalScope { 17 | attribute EventHandler onsync; 18 | }; 19 | 20 | [Exposed=ServiceWorker] 21 | interface SyncEvent : ExtendableEvent { 22 | constructor(DOMString type, SyncEventInit init); 23 | readonly attribute DOMString tag; 24 | readonly attribute boolean lastChance; 25 | }; 26 | 27 | dictionary SyncEventInit : ExtendableEventInit { 28 | required DOMString tag; 29 | boolean lastChance = false; 30 | }; 31 | -------------------------------------------------------------------------------- /js_pyi/w3c_webref/ed/idl/badging.idl: -------------------------------------------------------------------------------- 1 | // GENERATED CONTENT - DO NOT EDIT 2 | // Content was automatically extracted by Reffy into webref 3 | // (https://github.com/w3c/webref) 4 | // Source: Badging API (https://w3c.github.io/badging/) 5 | 6 | [SecureContext] 7 | partial interface Navigator { 8 | Promise setClientBadge(optional [EnforceRange] unsigned long long contents); 9 | Promise clearClientBadge(); 10 | }; 11 | 12 | [SecureContext] 13 | interface mixin NavigatorBadge { 14 | Promise setAppBadge(optional [EnforceRange] unsigned long long contents); 15 | Promise clearAppBadge(); 16 | }; 17 | 18 | Navigator includes NavigatorBadge; 19 | WorkerNavigator includes NavigatorBadge; 20 | -------------------------------------------------------------------------------- /js_pyi/w3c_webref/ed/idl/battery-status.idl: -------------------------------------------------------------------------------- 1 | // GENERATED CONTENT - DO NOT EDIT 2 | // Content was automatically extracted by Reffy into webref 3 | // (https://github.com/w3c/webref) 4 | // Source: Battery Status API (https://w3c.github.io/battery/) 5 | 6 | [SecureContext] 7 | partial interface Navigator { 8 | Promise getBattery(); 9 | }; 10 | 11 | [SecureContext, Exposed=Window] 12 | interface BatteryManager : EventTarget { 13 | readonly attribute boolean charging; 14 | readonly attribute unrestricted double chargingTime; 15 | readonly attribute unrestricted double dischargingTime; 16 | readonly attribute double level; 17 | attribute EventHandler onchargingchange; 18 | attribute EventHandler onchargingtimechange; 19 | attribute EventHandler ondischargingtimechange; 20 | attribute EventHandler onlevelchange; 21 | }; 22 | -------------------------------------------------------------------------------- /js_pyi/w3c_webref/ed/idl/beacon.idl: -------------------------------------------------------------------------------- 1 | // GENERATED CONTENT - DO NOT EDIT 2 | // Content was automatically extracted by Reffy into webref 3 | // (https://github.com/w3c/webref) 4 | // Source: Beacon (https://w3c.github.io/beacon/) 5 | 6 | partial interface Navigator { 7 | boolean sendBeacon(USVString url, optional BodyInit? data = null); 8 | }; 9 | -------------------------------------------------------------------------------- /js_pyi/w3c_webref/ed/idl/capture-handle-identity.idl: -------------------------------------------------------------------------------- 1 | // GENERATED CONTENT - DO NOT EDIT 2 | // Content was automatically extracted by Reffy into webref 3 | // (https://github.com/w3c/webref) 4 | // Source: Capture Handle - Bootstrapping Collaboration when Screensharing (https://w3c.github.io/mediacapture-handle/identity/) 5 | 6 | dictionary CaptureHandleConfig { 7 | boolean exposeOrigin = false; 8 | DOMString handle = ""; 9 | sequence permittedOrigins = []; 10 | }; 11 | 12 | partial interface MediaDevices { 13 | undefined setCaptureHandleConfig(optional CaptureHandleConfig config = {}); 14 | }; 15 | 16 | dictionary CaptureHandle { 17 | DOMString origin; 18 | DOMString handle; 19 | }; 20 | 21 | partial interface MediaStreamTrack { 22 | CaptureHandle? getCaptureHandle(); 23 | }; 24 | 25 | partial interface MediaStreamTrack { 26 | attribute EventHandler oncapturehandlechange; 27 | }; 28 | -------------------------------------------------------------------------------- /js_pyi/w3c_webref/ed/idl/clipboard-apis.idl: -------------------------------------------------------------------------------- 1 | // GENERATED CONTENT - DO NOT EDIT 2 | // Content was automatically extracted by Reffy into webref 3 | // (https://github.com/w3c/webref) 4 | // Source: Clipboard API and events (https://w3c.github.io/clipboard-apis/) 5 | 6 | dictionary ClipboardEventInit : EventInit { 7 | DataTransfer? clipboardData = null; 8 | }; 9 | 10 | [Exposed=Window] 11 | interface ClipboardEvent : Event { 12 | constructor(DOMString type, optional ClipboardEventInit eventInitDict = {}); 13 | readonly attribute DataTransfer? clipboardData; 14 | }; 15 | 16 | partial interface Navigator { 17 | [SecureContext, SameObject] readonly attribute Clipboard clipboard; 18 | }; 19 | 20 | typedef Promise<(DOMString or Blob)> ClipboardItemData; 21 | 22 | [SecureContext, Exposed=Window] 23 | interface ClipboardItem { 24 | constructor(record items, 25 | optional ClipboardItemOptions options = {}); 26 | 27 | readonly attribute PresentationStyle presentationStyle; 28 | readonly attribute FrozenArray types; 29 | 30 | Promise getType(DOMString type); 31 | }; 32 | 33 | enum PresentationStyle { "unspecified", "inline", "attachment" }; 34 | 35 | dictionary ClipboardItemOptions { 36 | PresentationStyle presentationStyle = "unspecified"; 37 | }; 38 | 39 | typedef sequence ClipboardItems; 40 | 41 | [SecureContext, Exposed=Window] 42 | interface Clipboard : EventTarget { 43 | Promise read(); 44 | Promise readText(); 45 | Promise write(ClipboardItems data); 46 | Promise writeText(DOMString data); 47 | }; 48 | 49 | dictionary ClipboardPermissionDescriptor : PermissionDescriptor { 50 | boolean allowWithoutGesture = false; 51 | }; 52 | -------------------------------------------------------------------------------- /js_pyi/w3c_webref/ed/idl/close-watcher.idl: -------------------------------------------------------------------------------- 1 | // GENERATED CONTENT - DO NOT EDIT 2 | // Content was automatically extracted by Reffy into webref 3 | // (https://github.com/w3c/webref) 4 | // Source: Close Watcher API (https://wicg.github.io/close-watcher/) 5 | 6 | [Exposed=Window] 7 | interface CloseWatcher : EventTarget { 8 | constructor(optional CloseWatcherOptions options = {}); 9 | 10 | undefined destroy(); 11 | undefined close(); 12 | 13 | attribute EventHandler oncancel; 14 | attribute EventHandler onclose; 15 | }; 16 | 17 | dictionary CloseWatcherOptions { 18 | AbortSignal signal; 19 | }; 20 | -------------------------------------------------------------------------------- /js_pyi/w3c_webref/ed/idl/compat.idl: -------------------------------------------------------------------------------- 1 | // GENERATED CONTENT - DO NOT EDIT 2 | // Content was automatically extracted by Reffy into webref 3 | // (https://github.com/w3c/webref) 4 | // Source: Compatibility Standard (https://compat.spec.whatwg.org/) 5 | 6 | partial interface Window { 7 | readonly attribute short orientation; 8 | attribute EventHandler onorientationchange; 9 | }; 10 | 11 | partial interface HTMLBodyElement { 12 | attribute EventHandler onorientationchange; 13 | }; 14 | -------------------------------------------------------------------------------- /js_pyi/w3c_webref/ed/idl/compression.idl: -------------------------------------------------------------------------------- 1 | // GENERATED CONTENT - DO NOT EDIT 2 | // Content was automatically extracted by Reffy into webref 3 | // (https://github.com/w3c/webref) 4 | // Source: Compression Streams (https://wicg.github.io/compression/) 5 | 6 | [Exposed=*] 7 | interface CompressionStream { 8 | constructor(DOMString format); 9 | }; 10 | CompressionStream includes GenericTransformStream; 11 | 12 | [Exposed=*] 13 | interface DecompressionStream { 14 | constructor(DOMString format); 15 | }; 16 | DecompressionStream includes GenericTransformStream; 17 | -------------------------------------------------------------------------------- /js_pyi/w3c_webref/ed/idl/compute-pressure.idl: -------------------------------------------------------------------------------- 1 | // GENERATED CONTENT - DO NOT EDIT 2 | // Content was automatically extracted by Reffy into webref 3 | // (https://github.com/w3c/webref) 4 | // Source: Compute Pressure Level 1 (https://w3c.github.io/compute-pressure/) 5 | 6 | enum PressureState { "nominal", "fair", "serious", "critical" }; 7 | 8 | enum PressureFactor { "thermal", "power-supply" }; 9 | 10 | callback PressureUpdateCallback = undefined ( 11 | sequence changes, 12 | PressureObserver observer 13 | ); 14 | 15 | enum PressureSource { "cpu" }; 16 | 17 | [Exposed=(DedicatedWorker,SharedWorker,Window), SecureContext] 18 | interface PressureObserver { 19 | constructor(PressureUpdateCallback callback, optional PressureObserverOptions options = {}); 20 | 21 | Promise observe(PressureSource source); 22 | undefined unobserve(PressureSource source); 23 | undefined disconnect(); 24 | sequence takeRecords(); 25 | 26 | [SameObject] static readonly attribute FrozenArray supportedSources; 27 | }; 28 | 29 | [Exposed=(DedicatedWorker,SharedWorker,Window), SecureContext] 30 | interface PressureRecord { 31 | readonly attribute PressureSource source; 32 | readonly attribute PressureState state; 33 | readonly attribute FrozenArray factors; 34 | readonly attribute DOMHighResTimeStamp time; 35 | }; 36 | 37 | dictionary PressureObserverOptions { 38 | double sampleRate = 1.0; 39 | }; 40 | -------------------------------------------------------------------------------- /js_pyi/w3c_webref/ed/idl/console.idl: -------------------------------------------------------------------------------- 1 | // GENERATED CONTENT - DO NOT EDIT 2 | // Content was automatically extracted by Reffy into webref 3 | // (https://github.com/w3c/webref) 4 | // Source: Console Standard (https://console.spec.whatwg.org/) 5 | 6 | [Exposed=*] 7 | namespace console { // but see namespace object requirements below 8 | // Logging 9 | undefined assert(optional boolean condition = false, any... data); 10 | undefined clear(); 11 | undefined debug(any... data); 12 | undefined error(any... data); 13 | undefined info(any... data); 14 | undefined log(any... data); 15 | undefined table(optional any tabularData, optional sequence properties); 16 | undefined trace(any... data); 17 | undefined warn(any... data); 18 | undefined dir(optional any item, optional object? options); 19 | undefined dirxml(any... data); 20 | 21 | // Counting 22 | undefined count(optional DOMString label = "default"); 23 | undefined countReset(optional DOMString label = "default"); 24 | 25 | // Grouping 26 | undefined group(any... data); 27 | undefined groupCollapsed(any... data); 28 | undefined groupEnd(); 29 | 30 | // Timing 31 | undefined time(optional DOMString label = "default"); 32 | undefined timeLog(optional DOMString label = "default", any... data); 33 | undefined timeEnd(optional DOMString label = "default"); 34 | }; 35 | -------------------------------------------------------------------------------- /js_pyi/w3c_webref/ed/idl/contact-picker.idl: -------------------------------------------------------------------------------- 1 | // GENERATED CONTENT - DO NOT EDIT 2 | // Content was automatically extracted by Reffy into webref 3 | // (https://github.com/w3c/webref) 4 | // Source: Contact Picker API (https://w3c.github.io/contact-picker/spec/) 5 | 6 | [Exposed=Window] 7 | partial interface Navigator { 8 | [SecureContext, SameObject] readonly attribute ContactsManager contacts; 9 | }; 10 | 11 | enum ContactProperty { "address", "email", "icon", "name", "tel" }; 12 | 13 | [Exposed=Window] 14 | interface ContactAddress { 15 | [Default] object toJSON(); 16 | readonly attribute DOMString city; 17 | readonly attribute DOMString country; 18 | readonly attribute DOMString dependentLocality; 19 | readonly attribute DOMString organization; 20 | readonly attribute DOMString phone; 21 | readonly attribute DOMString postalCode; 22 | readonly attribute DOMString recipient; 23 | readonly attribute DOMString region; 24 | readonly attribute DOMString sortingCode; 25 | readonly attribute FrozenArray addressLine; 26 | }; 27 | 28 | dictionary ContactInfo { 29 | sequence address; 30 | sequence email; 31 | sequence icon; 32 | sequence name; 33 | sequence tel; 34 | }; 35 | 36 | dictionary ContactsSelectOptions { 37 | boolean multiple = false; 38 | }; 39 | 40 | [Exposed=Window,SecureContext] 41 | interface ContactsManager { 42 | Promise> getProperties(); 43 | Promise> select(sequence properties, optional ContactsSelectOptions options = {}); 44 | }; 45 | -------------------------------------------------------------------------------- /js_pyi/w3c_webref/ed/idl/content-index.idl: -------------------------------------------------------------------------------- 1 | // GENERATED CONTENT - DO NOT EDIT 2 | // Content was automatically extracted by Reffy into webref 3 | // (https://github.com/w3c/webref) 4 | // Source: Content Index (https://wicg.github.io/content-index/spec/) 5 | 6 | partial interface ServiceWorkerGlobalScope { 7 | attribute EventHandler oncontentdelete; 8 | }; 9 | 10 | partial interface ServiceWorkerRegistration { 11 | [SameObject] readonly attribute ContentIndex index; 12 | }; 13 | 14 | enum ContentCategory { 15 | "", 16 | "homepage", 17 | "article", 18 | "video", 19 | "audio", 20 | }; 21 | 22 | dictionary ContentDescription { 23 | required DOMString id; 24 | required DOMString title; 25 | required DOMString description; 26 | ContentCategory category = ""; 27 | sequence icons = []; 28 | required USVString url; 29 | }; 30 | 31 | [Exposed=(Window,Worker)] 32 | interface ContentIndex { 33 | Promise add(ContentDescription description); 34 | Promise delete(DOMString id); 35 | Promise> getAll(); 36 | }; 37 | 38 | dictionary ContentIndexEventInit : ExtendableEventInit { 39 | required DOMString id; 40 | }; 41 | 42 | [Exposed=ServiceWorker] 43 | interface ContentIndexEvent : ExtendableEvent { 44 | constructor(DOMString type, ContentIndexEventInit init); 45 | readonly attribute DOMString id; 46 | }; 47 | -------------------------------------------------------------------------------- /js_pyi/w3c_webref/ed/idl/crash-reporting.idl: -------------------------------------------------------------------------------- 1 | // GENERATED CONTENT - DO NOT EDIT 2 | // Content was automatically extracted by Reffy into webref 3 | // (https://github.com/w3c/webref) 4 | // Source: Crash Reporting (https://wicg.github.io/crash-reporting/) 5 | 6 | [Exposed=(Window,Worker)] 7 | interface CrashReportBody : ReportBody { 8 | [Default] object toJSON(); 9 | readonly attribute DOMString? reason; 10 | }; 11 | -------------------------------------------------------------------------------- /js_pyi/w3c_webref/ed/idl/csp-embedded-enforcement.idl: -------------------------------------------------------------------------------- 1 | // GENERATED CONTENT - DO NOT EDIT 2 | // Content was automatically extracted by Reffy into webref 3 | // (https://github.com/w3c/webref) 4 | // Source: Content Security Policy: Embedded Enforcement (https://w3c.github.io/webappsec-cspee/) 5 | 6 | partial interface HTMLIFrameElement { 7 | [CEReactions] attribute DOMString csp; 8 | }; 9 | -------------------------------------------------------------------------------- /js_pyi/w3c_webref/ed/idl/csp-next.idl: -------------------------------------------------------------------------------- 1 | // GENERATED CONTENT - DO NOT EDIT 2 | // Content was automatically extracted by Reffy into webref 3 | // (https://github.com/w3c/webref) 4 | // Source: Scripting Policy (https://wicg.github.io/csp-next/scripting-policy.html) 5 | 6 | enum ScriptingPolicyViolationType { 7 | "externalScript", 8 | "inlineScript", 9 | "inlineEventHandler", 10 | "eval" 11 | }; 12 | 13 | [Exposed=(Window,Worker), SecureContext] 14 | interface ScriptingPolicyReportBody : ReportBody { 15 | [Default] object toJSON(); 16 | readonly attribute DOMString violationType; 17 | readonly attribute USVString? violationURL; 18 | readonly attribute USVString? violationSample; 19 | readonly attribute unsigned long lineno; 20 | readonly attribute unsigned long colno; 21 | }; 22 | -------------------------------------------------------------------------------- /js_pyi/w3c_webref/ed/idl/css-animation-worklet.idl: -------------------------------------------------------------------------------- 1 | // GENERATED CONTENT - DO NOT EDIT 2 | // Content was automatically extracted by Reffy into webref 3 | // (https://github.com/w3c/webref) 4 | // Source: CSS Animation Worklet API (https://drafts.css-houdini.org/css-animationworklet-1/) 5 | 6 | [Exposed=Window] 7 | partial namespace CSS { 8 | [SameObject] readonly attribute Worklet animationWorklet; 9 | }; 10 | 11 | [ Global=(Worklet,AnimationWorklet), Exposed=AnimationWorklet ] 12 | interface AnimationWorkletGlobalScope : WorkletGlobalScope { 13 | undefined registerAnimator(DOMString name, AnimatorInstanceConstructor animatorCtor); 14 | }; 15 | 16 | callback AnimatorInstanceConstructor = any (any options, optional any state); 17 | 18 | [ Exposed=AnimationWorklet ] 19 | interface WorkletAnimationEffect { 20 | EffectTiming getTiming(); 21 | ComputedEffectTiming getComputedTiming(); 22 | attribute double? localTime; 23 | }; 24 | 25 | [Exposed=Window] 26 | interface WorkletAnimation : Animation { 27 | constructor(DOMString animatorName, 28 | optional (AnimationEffect or sequence)? effects = null, 29 | optional AnimationTimeline? timeline, 30 | optional any options); 31 | readonly attribute DOMString animatorName; 32 | }; 33 | 34 | [Exposed=AnimationWorklet] 35 | interface WorkletGroupEffect { 36 | sequence getChildren(); 37 | }; 38 | -------------------------------------------------------------------------------- /js_pyi/w3c_webref/ed/idl/css-animations-2.idl: -------------------------------------------------------------------------------- 1 | // GENERATED CONTENT - DO NOT EDIT 2 | // Content was automatically extracted by Reffy into webref 3 | // (https://github.com/w3c/webref) 4 | // Source: CSS Animations Level 2 (https://drafts.csswg.org/css-animations-2/) 5 | 6 | [Exposed=Window] 7 | interface CSSAnimation : Animation { 8 | readonly attribute CSSOMString animationName; 9 | }; 10 | -------------------------------------------------------------------------------- /js_pyi/w3c_webref/ed/idl/css-animations.idl: -------------------------------------------------------------------------------- 1 | // GENERATED CONTENT - DO NOT EDIT 2 | // Content was automatically extracted by Reffy into webref 3 | // (https://github.com/w3c/webref) 4 | // Source: CSS Animations Level 1 (https://drafts.csswg.org/css-animations-1/) 5 | 6 | [Exposed=Window] 7 | interface AnimationEvent : Event { 8 | constructor(CSSOMString type, optional AnimationEventInit animationEventInitDict = {}); 9 | readonly attribute CSSOMString animationName; 10 | readonly attribute double elapsedTime; 11 | readonly attribute CSSOMString pseudoElement; 12 | }; 13 | dictionary AnimationEventInit : EventInit { 14 | CSSOMString animationName = ""; 15 | double elapsedTime = 0.0; 16 | CSSOMString pseudoElement = ""; 17 | }; 18 | 19 | partial interface CSSRule { 20 | const unsigned short KEYFRAMES_RULE = 7; 21 | const unsigned short KEYFRAME_RULE = 8; 22 | }; 23 | 24 | [Exposed=Window] 25 | interface CSSKeyframeRule : CSSRule { 26 | attribute CSSOMString keyText; 27 | [SameObject, PutForwards=cssText] readonly attribute CSSStyleDeclaration style; 28 | }; 29 | 30 | [Exposed=Window] 31 | interface CSSKeyframesRule : CSSRule { 32 | attribute CSSOMString name; 33 | readonly attribute CSSRuleList cssRules; 34 | readonly attribute unsigned long length; 35 | 36 | getter CSSKeyframeRule (unsigned long index); 37 | undefined appendRule(CSSOMString rule); 38 | undefined deleteRule(CSSOMString select); 39 | CSSKeyframeRule? findRule(CSSOMString select); 40 | }; 41 | 42 | partial interface mixin GlobalEventHandlers { 43 | attribute EventHandler onanimationstart; 44 | attribute EventHandler onanimationiteration; 45 | attribute EventHandler onanimationend; 46 | attribute EventHandler onanimationcancel; 47 | }; 48 | -------------------------------------------------------------------------------- /js_pyi/w3c_webref/ed/idl/css-cascade.idl: -------------------------------------------------------------------------------- 1 | // GENERATED CONTENT - DO NOT EDIT 2 | // Content was automatically extracted by Reffy into webref 3 | // (https://github.com/w3c/webref) 4 | // Source: CSS Cascading and Inheritance Level 5 (https://drafts.csswg.org/css-cascade-5/) 5 | 6 | partial interface CSSImportRule { 7 | readonly attribute CSSOMString? layerName; 8 | }; 9 | 10 | [Exposed=Window] 11 | interface CSSLayerBlockRule : CSSGroupingRule { 12 | readonly attribute CSSOMString name; 13 | }; 14 | 15 | [Exposed=Window] 16 | interface CSSLayerStatementRule : CSSRule { 17 | readonly attribute FrozenArray nameList; 18 | }; 19 | -------------------------------------------------------------------------------- /js_pyi/w3c_webref/ed/idl/css-color-5.idl: -------------------------------------------------------------------------------- 1 | // GENERATED CONTENT - DO NOT EDIT 2 | // Content was automatically extracted by Reffy into webref 3 | // (https://github.com/w3c/webref) 4 | // Source: CSS Color Module Level 5 (https://drafts.csswg.org/css-color-5/) 5 | 6 | [Exposed=Window] 7 | interface CSSColorProfileRule : CSSRule { 8 | readonly attribute CSSOMString name ; 9 | readonly attribute CSSOMString src ; 10 | readonly attribute CSSOMString renderingIntent ; 11 | readonly attribute CSSOMString components ; 12 | }; 13 | -------------------------------------------------------------------------------- /js_pyi/w3c_webref/ed/idl/css-conditional.idl: -------------------------------------------------------------------------------- 1 | // GENERATED CONTENT - DO NOT EDIT 2 | // Content was automatically extracted by Reffy into webref 3 | // (https://github.com/w3c/webref) 4 | // Source: CSS Conditional Rules Module Level 3 (https://drafts.csswg.org/css-conditional-3/) 5 | 6 | partial interface CSSRule { 7 | const unsigned short SUPPORTS_RULE = 12; 8 | }; 9 | 10 | [Exposed=Window] 11 | interface CSSConditionRule : CSSGroupingRule { 12 | readonly attribute CSSOMString conditionText; 13 | }; 14 | 15 | [Exposed=Window] 16 | interface CSSMediaRule : CSSConditionRule { 17 | [SameObject, PutForwards=mediaText] readonly attribute MediaList media; 18 | }; 19 | 20 | [Exposed=Window] 21 | interface CSSSupportsRule : CSSConditionRule { 22 | }; 23 | 24 | partial namespace CSS { 25 | boolean supports(CSSOMString property, CSSOMString value); 26 | boolean supports(CSSOMString conditionText); 27 | }; 28 | -------------------------------------------------------------------------------- /js_pyi/w3c_webref/ed/idl/css-contain-3.idl: -------------------------------------------------------------------------------- 1 | // GENERATED CONTENT - DO NOT EDIT 2 | // Content was automatically extracted by Reffy into webref 3 | // (https://github.com/w3c/webref) 4 | // Source: CSS Containment Module Level 3 (https://drafts.csswg.org/css-contain-3/) 5 | 6 | [Exposed=Window] 7 | interface CSSContainerRule : CSSConditionRule { 8 | readonly attribute CSSOMString containerName; 9 | readonly attribute CSSOMString containerQuery; 10 | }; 11 | -------------------------------------------------------------------------------- /js_pyi/w3c_webref/ed/idl/css-contain.idl: -------------------------------------------------------------------------------- 1 | // GENERATED CONTENT - DO NOT EDIT 2 | // Content was automatically extracted by Reffy into webref 3 | // (https://github.com/w3c/webref) 4 | // Source: CSS Containment Module Level 2 (https://drafts.csswg.org/css-contain-2/) 5 | 6 | [Exposed=Window] 7 | interface ContentVisibilityAutoStateChangedEvent : Event { 8 | constructor(DOMString type, optional ContentVisibilityAutoStateChangedEventInit eventInitDict = {}); 9 | readonly attribute boolean skipped; 10 | }; 11 | dictionary ContentVisibilityAutoStateChangedEventInit : EventInit { 12 | boolean skipped = false; 13 | }; 14 | -------------------------------------------------------------------------------- /js_pyi/w3c_webref/ed/idl/css-counter-styles.idl: -------------------------------------------------------------------------------- 1 | // GENERATED CONTENT - DO NOT EDIT 2 | // Content was automatically extracted by Reffy into webref 3 | // (https://github.com/w3c/webref) 4 | // Source: CSS Counter Styles Level 3 (https://drafts.csswg.org/css-counter-styles-3/) 5 | 6 | partial interface CSSRule { 7 | const unsigned short COUNTER_STYLE_RULE = 11; 8 | }; 9 | 10 | [Exposed=Window] 11 | interface CSSCounterStyleRule : CSSRule { 12 | attribute CSSOMString name; 13 | attribute CSSOMString system; 14 | attribute CSSOMString symbols; 15 | attribute CSSOMString additiveSymbols; 16 | attribute CSSOMString negative; 17 | attribute CSSOMString prefix; 18 | attribute CSSOMString suffix; 19 | attribute CSSOMString range; 20 | attribute CSSOMString pad; 21 | attribute CSSOMString speakAs; 22 | attribute CSSOMString fallback; 23 | }; 24 | -------------------------------------------------------------------------------- /js_pyi/w3c_webref/ed/idl/css-fonts.idl: -------------------------------------------------------------------------------- 1 | // GENERATED CONTENT - DO NOT EDIT 2 | // Content was automatically extracted by Reffy into webref 3 | // (https://github.com/w3c/webref) 4 | // Source: CSS Fonts Module Level 4 (https://drafts.csswg.org/css-fonts-4/) 5 | 6 | [Exposed=Window] 7 | interface CSSFontFaceRule : CSSRule { 8 | readonly attribute CSSStyleDeclaration style; 9 | }; 10 | 11 | partial interface CSSRule { const unsigned short FONT_FEATURE_VALUES_RULE = 14; 12 | }; 13 | [Exposed=Window] 14 | interface CSSFontFeatureValuesRule : CSSRule { 15 | attribute CSSOMString fontFamily; 16 | readonly attribute CSSFontFeatureValuesMap annotation; 17 | readonly attribute CSSFontFeatureValuesMap ornaments; 18 | readonly attribute CSSFontFeatureValuesMap stylistic; 19 | readonly attribute CSSFontFeatureValuesMap swash; 20 | readonly attribute CSSFontFeatureValuesMap characterVariant; 21 | readonly attribute CSSFontFeatureValuesMap styleset; 22 | }; 23 | 24 | [Exposed=Window] 25 | interface CSSFontFeatureValuesMap { 26 | maplike>; 27 | undefined set(CSSOMString featureValueName, 28 | (unsigned long or sequence) values); 29 | }; 30 | 31 | [Exposed=Window]interface CSSFontPaletteValuesRule : CSSRule { 32 | readonly attribute CSSOMString name; 33 | readonly attribute CSSOMString fontFamily; 34 | readonly attribute CSSOMString basePalette; 35 | readonly attribute CSSOMString overrideColors; 36 | }; 37 | -------------------------------------------------------------------------------- /js_pyi/w3c_webref/ed/idl/css-highlight-api.idl: -------------------------------------------------------------------------------- 1 | // GENERATED CONTENT - DO NOT EDIT 2 | // Content was automatically extracted by Reffy into webref 3 | // (https://github.com/w3c/webref) 4 | // Source: CSS Custom Highlight API Module Level 1 (https://drafts.csswg.org/css-highlight-api-1/) 5 | 6 | enum HighlightType { 7 | "highlight", 8 | "spelling-error", 9 | "grammar-error" 10 | }; 11 | 12 | [Exposed=Window] 13 | interface Highlight { 14 | constructor(AbstractRange... initialRanges); 15 | setlike; 16 | attribute long priority; 17 | attribute HighlightType type; 18 | }; 19 | 20 | partial namespace CSS { 21 | readonly attribute HighlightRegistry highlights; 22 | }; 23 | 24 | [Exposed=Window] 25 | interface HighlightRegistry { 26 | maplike; 27 | }; 28 | -------------------------------------------------------------------------------- /js_pyi/w3c_webref/ed/idl/css-images-4.idl: -------------------------------------------------------------------------------- 1 | // GENERATED CONTENT - DO NOT EDIT 2 | // Content was automatically extracted by Reffy into webref 3 | // (https://github.com/w3c/webref) 4 | // Source: CSS Images Module Level 4 (https://drafts.csswg.org/css-images-4/) 5 | 6 | partial namespace CSS { 7 | [SameObject] readonly attribute any elementSources; 8 | }; 9 | -------------------------------------------------------------------------------- /js_pyi/w3c_webref/ed/idl/css-masking.idl: -------------------------------------------------------------------------------- 1 | // GENERATED CONTENT - DO NOT EDIT 2 | // Content was automatically extracted by Reffy into webref 3 | // (https://github.com/w3c/webref) 4 | // Source: CSS Masking Module Level 1 (https://drafts.fxtf.org/css-masking-1/) 5 | 6 | [Exposed=Window] 7 | interface SVGClipPathElement : SVGElement { 8 | readonly attribute SVGAnimatedEnumeration clipPathUnits; 9 | readonly attribute SVGAnimatedTransformList transform; 10 | }; 11 | 12 | [Exposed=Window] 13 | interface SVGMaskElement : SVGElement { 14 | readonly attribute SVGAnimatedEnumeration maskUnits; 15 | readonly attribute SVGAnimatedEnumeration maskContentUnits; 16 | readonly attribute SVGAnimatedLength x; 17 | readonly attribute SVGAnimatedLength y; 18 | readonly attribute SVGAnimatedLength width; 19 | readonly attribute SVGAnimatedLength height; 20 | }; 21 | -------------------------------------------------------------------------------- /js_pyi/w3c_webref/ed/idl/css-nav.idl: -------------------------------------------------------------------------------- 1 | // GENERATED CONTENT - DO NOT EDIT 2 | // Content was automatically extracted by Reffy into webref 3 | // (https://github.com/w3c/webref) 4 | // Source: CSS Spatial Navigation Level 1 (https://drafts.csswg.org/css-nav-1/) 5 | 6 | enum SpatialNavigationDirection { 7 | "up", 8 | "down", 9 | "left", 10 | "right", 11 | }; 12 | 13 | partial interface Window { 14 | undefined navigate(SpatialNavigationDirection dir); 15 | }; 16 | 17 | enum FocusableAreaSearchMode { 18 | "visible", 19 | "all" 20 | }; 21 | 22 | dictionary FocusableAreasOption { 23 | FocusableAreaSearchMode mode; 24 | }; 25 | 26 | dictionary SpatialNavigationSearchOptions { 27 | sequence? candidates; 28 | Node? container; 29 | }; 30 | 31 | partial interface Element { 32 | Node getSpatialNavigationContainer(); 33 | sequence focusableAreas(optional FocusableAreasOption option = {}); 34 | Node? spatialNavigationSearch(SpatialNavigationDirection dir, optional SpatialNavigationSearchOptions options = {}); 35 | }; 36 | 37 | [Exposed=Window] 38 | interface NavigationEvent : UIEvent { 39 | constructor(DOMString type, 40 | optional NavigationEventInit eventInitDict = {}); 41 | readonly attribute SpatialNavigationDirection dir; 42 | readonly attribute EventTarget? relatedTarget; 43 | }; 44 | 45 | dictionary NavigationEventInit : UIEventInit { 46 | SpatialNavigationDirection dir; 47 | EventTarget? relatedTarget = null; 48 | }; 49 | -------------------------------------------------------------------------------- /js_pyi/w3c_webref/ed/idl/css-nesting.idl: -------------------------------------------------------------------------------- 1 | // GENERATED CONTENT - DO NOT EDIT 2 | // Content was automatically extracted by Reffy into webref 3 | // (https://github.com/w3c/webref) 4 | // Source: CSS Nesting Module (https://drafts.csswg.org/css-nesting-1/) 5 | 6 | partial interface CSSStyleRule { 7 | [SameObject] readonly attribute CSSRuleList cssRules; 8 | unsigned long insertRule(CSSOMString rule, optional unsigned long index = 0); 9 | undefined deleteRule(unsigned long index); 10 | }; 11 | -------------------------------------------------------------------------------- /js_pyi/w3c_webref/ed/idl/css-paint-api.idl: -------------------------------------------------------------------------------- 1 | // GENERATED CONTENT - DO NOT EDIT 2 | // Content was automatically extracted by Reffy into webref 3 | // (https://github.com/w3c/webref) 4 | // Source: CSS Painting API Level 1 (https://drafts.css-houdini.org/css-paint-api-1/) 5 | 6 | partial namespace CSS { 7 | [SameObject] readonly attribute Worklet paintWorklet; 8 | }; 9 | 10 | [Global=(Worklet,PaintWorklet),Exposed=PaintWorklet] 11 | interface PaintWorkletGlobalScope : WorkletGlobalScope { 12 | undefined registerPaint(DOMString name, VoidFunction paintCtor); 13 | readonly attribute unrestricted double devicePixelRatio; 14 | }; 15 | 16 | dictionary PaintRenderingContext2DSettings { 17 | boolean alpha = true; 18 | }; 19 | 20 | [Exposed=PaintWorklet] 21 | interface PaintRenderingContext2D { 22 | }; 23 | PaintRenderingContext2D includes CanvasState; 24 | PaintRenderingContext2D includes CanvasTransform; 25 | PaintRenderingContext2D includes CanvasCompositing; 26 | PaintRenderingContext2D includes CanvasImageSmoothing; 27 | PaintRenderingContext2D includes CanvasFillStrokeStyles; 28 | PaintRenderingContext2D includes CanvasShadowStyles; 29 | PaintRenderingContext2D includes CanvasRect; 30 | PaintRenderingContext2D includes CanvasDrawPath; 31 | PaintRenderingContext2D includes CanvasDrawImage; 32 | PaintRenderingContext2D includes CanvasPathDrawingStyles; 33 | PaintRenderingContext2D includes CanvasPath; 34 | 35 | [Exposed=PaintWorklet] 36 | interface PaintSize { 37 | readonly attribute double width; 38 | readonly attribute double height; 39 | }; 40 | -------------------------------------------------------------------------------- /js_pyi/w3c_webref/ed/idl/css-properties-values-api.idl: -------------------------------------------------------------------------------- 1 | // GENERATED CONTENT - DO NOT EDIT 2 | // Content was automatically extracted by Reffy into webref 3 | // (https://github.com/w3c/webref) 4 | // Source: CSS Properties and Values API Level 1 (https://drafts.css-houdini.org/css-properties-values-api-1/) 5 | 6 | dictionary PropertyDefinition { 7 | required DOMString name; 8 | DOMString syntax = "*"; 9 | required boolean inherits; 10 | DOMString initialValue; 11 | }; 12 | 13 | partial namespace CSS { 14 | undefined registerProperty(PropertyDefinition definition); 15 | }; 16 | 17 | [Exposed=Window] 18 | interface CSSPropertyRule : CSSRule { 19 | readonly attribute CSSOMString name; 20 | readonly attribute CSSOMString syntax; 21 | readonly attribute boolean inherits; 22 | readonly attribute CSSOMString? initialValue; 23 | }; 24 | -------------------------------------------------------------------------------- /js_pyi/w3c_webref/ed/idl/css-pseudo.idl: -------------------------------------------------------------------------------- 1 | // GENERATED CONTENT - DO NOT EDIT 2 | // Content was automatically extracted by Reffy into webref 3 | // (https://github.com/w3c/webref) 4 | // Source: CSS Pseudo-Elements Module Level 4 (https://drafts.csswg.org/css-pseudo-4/) 5 | 6 | [Exposed=Window] 7 | interface CSSPseudoElement : EventTarget { 8 | readonly attribute CSSOMString type; 9 | readonly attribute Element element; 10 | readonly attribute (Element or CSSPseudoElement) parent; 11 | CSSPseudoElement? pseudo(CSSOMString type); 12 | }; 13 | 14 | partial interface Element { 15 | CSSPseudoElement? pseudo(CSSOMString type); 16 | }; 17 | -------------------------------------------------------------------------------- /js_pyi/w3c_webref/ed/idl/css-regions.idl: -------------------------------------------------------------------------------- 1 | // GENERATED CONTENT - DO NOT EDIT 2 | // Content was automatically extracted by Reffy into webref 3 | // (https://github.com/w3c/webref) 4 | // Source: CSS Regions Module Level 1 (https://drafts.csswg.org/css-regions-1/) 5 | 6 | partial interface Document { 7 | readonly attribute NamedFlowMap namedFlows; 8 | }; 9 | 10 | [Exposed=Window] interface NamedFlowMap { 11 | maplike; 12 | }; 13 | 14 | [Exposed=Window] 15 | interface NamedFlow : EventTarget { 16 | readonly attribute CSSOMString name; 17 | readonly attribute boolean overset; 18 | sequence getRegions(); 19 | readonly attribute short firstEmptyRegionIndex; 20 | sequence getContent(); 21 | sequence getRegionsByContent(Node node); 22 | }; 23 | 24 | interface mixin Region { 25 | readonly attribute CSSOMString regionOverset; 26 | sequence? getRegionFlowRanges(); 27 | }; 28 | 29 | Element includes Region; 30 | -------------------------------------------------------------------------------- /js_pyi/w3c_webref/ed/idl/css-shadow-parts.idl: -------------------------------------------------------------------------------- 1 | // GENERATED CONTENT - DO NOT EDIT 2 | // Content was automatically extracted by Reffy into webref 3 | // (https://github.com/w3c/webref) 4 | // Source: CSS Shadow Parts (https://drafts.csswg.org/css-shadow-parts-1/) 5 | 6 | partial interface Element { 7 | [SameObject, PutForwards=value] readonly attribute DOMTokenList part; 8 | }; 9 | -------------------------------------------------------------------------------- /js_pyi/w3c_webref/ed/idl/css-transitions-2.idl: -------------------------------------------------------------------------------- 1 | // GENERATED CONTENT - DO NOT EDIT 2 | // Content was automatically extracted by Reffy into webref 3 | // (https://github.com/w3c/webref) 4 | // Source: CSS Transitions Level 2 (https://drafts.csswg.org/css-transitions-2/) 5 | 6 | [Exposed=Window] 7 | interface CSSTransition : Animation { 8 | readonly attribute CSSOMString transitionProperty; 9 | }; 10 | -------------------------------------------------------------------------------- /js_pyi/w3c_webref/ed/idl/css-transitions.idl: -------------------------------------------------------------------------------- 1 | // GENERATED CONTENT - DO NOT EDIT 2 | // Content was automatically extracted by Reffy into webref 3 | // (https://github.com/w3c/webref) 4 | // Source: CSS Transitions (https://drafts.csswg.org/css-transitions-1/) 5 | 6 | [Exposed=Window] 7 | interface TransitionEvent : Event { 8 | constructor(CSSOMString type, optional TransitionEventInit transitionEventInitDict = {}); 9 | readonly attribute CSSOMString propertyName; 10 | readonly attribute double elapsedTime; 11 | readonly attribute CSSOMString pseudoElement; 12 | }; 13 | 14 | dictionary TransitionEventInit : EventInit { 15 | CSSOMString propertyName = ""; 16 | double elapsedTime = 0.0; 17 | CSSOMString pseudoElement = ""; 18 | }; 19 | 20 | partial interface mixin GlobalEventHandlers { 21 | attribute EventHandler ontransitionrun; 22 | attribute EventHandler ontransitionstart; 23 | attribute EventHandler ontransitionend; 24 | attribute EventHandler ontransitioncancel; 25 | }; 26 | -------------------------------------------------------------------------------- /js_pyi/w3c_webref/ed/idl/css-view-transitions.idl: -------------------------------------------------------------------------------- 1 | // GENERATED CONTENT - DO NOT EDIT 2 | // Content was automatically extracted by Reffy into webref 3 | // (https://github.com/w3c/webref) 4 | // Source: CSS View Transitions Module Level 1 (https://drafts.csswg.org/css-view-transitions-1/) 5 | 6 | partial interface Document { 7 | ViewTransition startViewTransition(optional UpdateCallback? callback = null); 8 | }; 9 | 10 | callback UpdateCallback = Promise (); 11 | 12 | [Exposed=Window] 13 | interface ViewTransition { 14 | undefined skipTransition(); 15 | readonly attribute Promise finished; 16 | readonly attribute Promise ready; 17 | readonly attribute Promise updateCallbackDone; 18 | }; 19 | -------------------------------------------------------------------------------- /js_pyi/w3c_webref/ed/idl/custom-state-pseudo-class.idl: -------------------------------------------------------------------------------- 1 | // GENERATED CONTENT - DO NOT EDIT 2 | // Content was automatically extracted by Reffy into webref 3 | // (https://github.com/w3c/webref) 4 | // Source: Custom State Pseudo Class (https://wicg.github.io/custom-state-pseudo-class/) 5 | 6 | partial interface ElementInternals { 7 | readonly attribute CustomStateSet states; 8 | }; 9 | 10 | [Exposed=Window] 11 | interface CustomStateSet { 12 | setlike; 13 | undefined add(DOMString value); 14 | }; 15 | -------------------------------------------------------------------------------- /js_pyi/w3c_webref/ed/idl/datacue.idl: -------------------------------------------------------------------------------- 1 | // GENERATED CONTENT - DO NOT EDIT 2 | // Content was automatically extracted by Reffy into webref 3 | // (https://github.com/w3c/webref) 4 | // Source: DataCue API (https://wicg.github.io/datacue/) 5 | 6 | [Exposed=Window] 7 | interface DataCue : TextTrackCue { 8 | constructor(double startTime, unrestricted double endTime, 9 | any value, optional DOMString type); 10 | attribute any value; 11 | readonly attribute DOMString type; 12 | }; 13 | -------------------------------------------------------------------------------- /js_pyi/w3c_webref/ed/idl/deprecation-reporting.idl: -------------------------------------------------------------------------------- 1 | // GENERATED CONTENT - DO NOT EDIT 2 | // Content was automatically extracted by Reffy into webref 3 | // (https://github.com/w3c/webref) 4 | // Source: Deprecation Reporting (https://wicg.github.io/deprecation-reporting/) 5 | 6 | [Exposed=(Window,Worker)] 7 | interface DeprecationReportBody : ReportBody { 8 | [Default] object toJSON(); 9 | readonly attribute DOMString id; 10 | readonly attribute object? anticipatedRemoval; 11 | readonly attribute DOMString message; 12 | readonly attribute DOMString? sourceFile; 13 | readonly attribute unsigned long? lineNumber; 14 | readonly attribute unsigned long? columnNumber; 15 | }; 16 | -------------------------------------------------------------------------------- /js_pyi/w3c_webref/ed/idl/device-memory.idl: -------------------------------------------------------------------------------- 1 | // GENERATED CONTENT - DO NOT EDIT 2 | // Content was automatically extracted by Reffy into webref 3 | // (https://github.com/w3c/webref) 4 | // Source: Device Memory (https://www.w3.org/TR/device-memory/) 5 | 6 | [ 7 | SecureContext, 8 | Exposed=(Window,Worker) 9 | ] interface mixin NavigatorDeviceMemory { 10 | readonly attribute double deviceMemory; 11 | }; 12 | 13 | Navigator includes NavigatorDeviceMemory; 14 | WorkerNavigator includes NavigatorDeviceMemory; 15 | -------------------------------------------------------------------------------- /js_pyi/w3c_webref/ed/idl/device-posture.idl: -------------------------------------------------------------------------------- 1 | // GENERATED CONTENT - DO NOT EDIT 2 | // Content was automatically extracted by Reffy into webref 3 | // (https://github.com/w3c/webref) 4 | // Source: Device Posture API (https://w3c.github.io/device-posture/) 5 | 6 | [SecureContext, Exposed=(Window)] 7 | partial interface Navigator { 8 | [SameObject] readonly attribute DevicePosture devicePosture; 9 | }; 10 | 11 | [SecureContext, Exposed=(Window)] 12 | interface DevicePosture : EventTarget { 13 | readonly attribute DevicePostureType type; 14 | attribute EventHandler onchange; 15 | }; 16 | 17 | enum DevicePostureType { 18 | "continuous", 19 | "folded", 20 | "folded-over" 21 | }; 22 | -------------------------------------------------------------------------------- /js_pyi/w3c_webref/ed/idl/digital-goods.idl: -------------------------------------------------------------------------------- 1 | // GENERATED CONTENT - DO NOT EDIT 2 | // Content was automatically extracted by Reffy into webref 3 | // (https://github.com/w3c/webref) 4 | // Source: Digital Goods API (https://wicg.github.io/digital-goods/) 5 | 6 | partial interface Window { 7 | [SecureContext] Promise getDigitalGoodsService( 8 | DOMString serviceProvider); 9 | }; 10 | 11 | [Exposed=Window, SecureContext] interface DigitalGoodsService { 12 | 13 | Promise> getDetails(sequence itemIds); 14 | 15 | Promise> listPurchases(); 16 | 17 | Promise> listPurchaseHistory(); 18 | 19 | Promise consume(DOMString purchaseToken); 20 | }; 21 | 22 | dictionary ItemDetails { 23 | required DOMString itemId; 24 | required DOMString title; 25 | required PaymentCurrencyAmount price; 26 | ItemType type; 27 | DOMString description; 28 | sequence iconURLs; 29 | DOMString subscriptionPeriod; 30 | DOMString freeTrialPeriod; 31 | PaymentCurrencyAmount introductoryPrice; 32 | DOMString introductoryPricePeriod; 33 | [EnforceRange] unsigned long long introductoryPriceCycles; 34 | }; 35 | 36 | enum ItemType { 37 | "product", 38 | "subscription", 39 | }; 40 | 41 | dictionary PurchaseDetails { 42 | required DOMString itemId; 43 | required DOMString purchaseToken; 44 | }; 45 | -------------------------------------------------------------------------------- /js_pyi/w3c_webref/ed/idl/element-timing.idl: -------------------------------------------------------------------------------- 1 | // GENERATED CONTENT - DO NOT EDIT 2 | // Content was automatically extracted by Reffy into webref 3 | // (https://github.com/w3c/webref) 4 | // Source: Element Timing API (https://wicg.github.io/element-timing/) 5 | 6 | [Exposed=Window] 7 | interface PerformanceElementTiming : PerformanceEntry { 8 | readonly attribute DOMHighResTimeStamp renderTime; 9 | readonly attribute DOMHighResTimeStamp loadTime; 10 | readonly attribute DOMRectReadOnly intersectionRect; 11 | readonly attribute DOMString identifier; 12 | readonly attribute unsigned long naturalWidth; 13 | readonly attribute unsigned long naturalHeight; 14 | readonly attribute DOMString id; 15 | readonly attribute Element? element; 16 | readonly attribute DOMString url; 17 | [Default] object toJSON(); 18 | }; 19 | 20 | partial interface Element { 21 | [CEReactions] attribute DOMString elementTiming; 22 | }; 23 | -------------------------------------------------------------------------------- /js_pyi/w3c_webref/ed/idl/encoding.idl: -------------------------------------------------------------------------------- 1 | // GENERATED CONTENT - DO NOT EDIT 2 | // Content was automatically extracted by Reffy into webref 3 | // (https://github.com/w3c/webref) 4 | // Source: Encoding Standard (https://encoding.spec.whatwg.org/) 5 | 6 | interface mixin TextDecoderCommon { 7 | readonly attribute DOMString encoding; 8 | readonly attribute boolean fatal; 9 | readonly attribute boolean ignoreBOM; 10 | }; 11 | 12 | dictionary TextDecoderOptions { 13 | boolean fatal = false; 14 | boolean ignoreBOM = false; 15 | }; 16 | 17 | dictionary TextDecodeOptions { 18 | boolean stream = false; 19 | }; 20 | 21 | [Exposed=*] 22 | interface TextDecoder { 23 | constructor(optional DOMString label = "utf-8", optional TextDecoderOptions options = {}); 24 | 25 | USVString decode(optional [AllowShared] BufferSource input, optional TextDecodeOptions options = {}); 26 | }; 27 | TextDecoder includes TextDecoderCommon; 28 | 29 | interface mixin TextEncoderCommon { 30 | readonly attribute DOMString encoding; 31 | }; 32 | 33 | dictionary TextEncoderEncodeIntoResult { 34 | unsigned long long read; 35 | unsigned long long written; 36 | }; 37 | 38 | [Exposed=*] 39 | interface TextEncoder { 40 | constructor(); 41 | 42 | [NewObject] Uint8Array encode(optional USVString input = ""); 43 | TextEncoderEncodeIntoResult encodeInto(USVString source, [AllowShared] Uint8Array destination); 44 | }; 45 | TextEncoder includes TextEncoderCommon; 46 | 47 | [Exposed=*] 48 | interface TextDecoderStream { 49 | constructor(optional DOMString label = "utf-8", optional TextDecoderOptions options = {}); 50 | }; 51 | TextDecoderStream includes TextDecoderCommon; 52 | TextDecoderStream includes GenericTransformStream; 53 | 54 | [Exposed=*] 55 | interface TextEncoderStream { 56 | constructor(); 57 | }; 58 | TextEncoderStream includes TextEncoderCommon; 59 | TextEncoderStream includes GenericTransformStream; 60 | -------------------------------------------------------------------------------- /js_pyi/w3c_webref/ed/idl/epub-rs.idl: -------------------------------------------------------------------------------- 1 | // GENERATED CONTENT - DO NOT EDIT 2 | // Content was automatically extracted by Reffy into webref 3 | // (https://github.com/w3c/webref) 4 | // Source: EPUB Reading Systems 3.3 (https://w3c.github.io/epub-specs/epub33/rs/) 5 | 6 | [Exposed=(Window)] 7 | interface EpubReadingSystem { 8 | boolean hasFeature(DOMString feature, optional DOMString version); 9 | }; 10 | 11 | partial interface Navigator { 12 | [LegacyUnforgeable, SameObject] readonly attribute EpubReadingSystem epubReadingSystem; 13 | }; 14 | -------------------------------------------------------------------------------- /js_pyi/w3c_webref/ed/idl/event-timing.idl: -------------------------------------------------------------------------------- 1 | // GENERATED CONTENT - DO NOT EDIT 2 | // Content was automatically extracted by Reffy into webref 3 | // (https://github.com/w3c/webref) 4 | // Source: Event Timing API (https://w3c.github.io/event-timing) 5 | 6 | [Exposed=Window] 7 | interface PerformanceEventTiming : PerformanceEntry { 8 | readonly attribute DOMHighResTimeStamp processingStart; 9 | readonly attribute DOMHighResTimeStamp processingEnd; 10 | readonly attribute boolean cancelable; 11 | readonly attribute Node? target; 12 | readonly attribute unsigned long long interactionId; 13 | [Default] object toJSON(); 14 | }; 15 | 16 | [Exposed=Window] 17 | interface EventCounts { 18 | readonly maplike; 19 | }; 20 | 21 | [Exposed=Window] 22 | partial interface Performance { 23 | [SameObject] readonly attribute EventCounts eventCounts; 24 | readonly attribute unsigned long long interactionCount; 25 | }; 26 | 27 | partial dictionary PerformanceObserverInit { 28 | DOMHighResTimeStamp durationThreshold; 29 | }; 30 | -------------------------------------------------------------------------------- /js_pyi/w3c_webref/ed/idl/eyedropper-api.idl: -------------------------------------------------------------------------------- 1 | // GENERATED CONTENT - DO NOT EDIT 2 | // Content was automatically extracted by Reffy into webref 3 | // (https://github.com/w3c/webref) 4 | // Source: EyeDropper API (https://wicg.github.io/eyedropper-api/) 5 | 6 | dictionary ColorSelectionResult { 7 | DOMString sRGBHex; 8 | }; 9 | 10 | dictionary ColorSelectionOptions { 11 | AbortSignal signal; 12 | }; 13 | 14 | [Exposed=Window, SecureContext] 15 | interface EyeDropper { 16 | constructor(); 17 | Promise open(optional ColorSelectionOptions options = {}); 18 | }; 19 | -------------------------------------------------------------------------------- /js_pyi/w3c_webref/ed/idl/fido.idl: -------------------------------------------------------------------------------- 1 | // GENERATED CONTENT - DO NOT EDIT 2 | // Content was automatically extracted by Reffy into webref 3 | // (https://github.com/w3c/webref) 4 | // Source: Client to Authenticator Protocol (CTAP) (https://fidoalliance.org/specs/fido-v2.1-ps-20210615/fido-client-to-authenticator-protocol-v2.1-ps-errata-20220621.html) 5 | 6 | partial dictionary AuthenticationExtensionsClientInputs { 7 | USVString credentialProtectionPolicy; 8 | boolean enforceCredentialProtectionPolicy = false; 9 | }; 10 | 11 | partial dictionary AuthenticationExtensionsClientInputs { 12 | ArrayBuffer credBlob; 13 | }; 14 | 15 | partial dictionary AuthenticationExtensionsClientInputs { 16 | boolean getCredBlob; 17 | }; 18 | 19 | partial dictionary AuthenticationExtensionsClientInputs { 20 | boolean minPinLength; 21 | }; 22 | 23 | partial dictionary AuthenticationExtensionsClientInputs { 24 | boolean hmacCreateSecret; 25 | }; 26 | 27 | dictionary HMACGetSecretInput { 28 | required ArrayBuffer salt1; // 32-byte random data 29 | ArrayBuffer salt2; // Optional additional 32-byte random data 30 | }; 31 | 32 | partial dictionary AuthenticationExtensionsClientInputs { 33 | HMACGetSecretInput hmacGetSecret; 34 | }; 35 | 36 | partial dictionary AuthenticationExtensionsClientOutputs { 37 | boolean hmacCreateSecret; 38 | }; 39 | 40 | dictionary HMACGetSecretOutput { 41 | required ArrayBuffer output1; 42 | ArrayBuffer output2; 43 | }; 44 | 45 | partial dictionary AuthenticationExtensionsClientOutputs { 46 | HMACGetSecretOutput hmacGetSecret; 47 | }; 48 | -------------------------------------------------------------------------------- /js_pyi/w3c_webref/ed/idl/font-metrics-api.idl: -------------------------------------------------------------------------------- 1 | // GENERATED CONTENT - DO NOT EDIT 2 | // Content was automatically extracted by Reffy into webref 3 | // (https://github.com/w3c/webref) 4 | // Source: Font Metrics API Level 1 (https://drafts.css-houdini.org/font-metrics-api-1/) 5 | 6 | partial interface Document { 7 | FontMetrics measureElement(Element element); 8 | FontMetrics measureText(DOMString text, StylePropertyMapReadOnly styleMap); 9 | }; 10 | 11 | [Exposed=Window] 12 | interface FontMetrics { 13 | readonly attribute double width; 14 | readonly attribute FrozenArray advances; 15 | 16 | readonly attribute double boundingBoxLeft; 17 | readonly attribute double boundingBoxRight; 18 | 19 | readonly attribute double height; 20 | readonly attribute double emHeightAscent; 21 | readonly attribute double emHeightDescent; 22 | readonly attribute double boundingBoxAscent; 23 | readonly attribute double boundingBoxDescent; 24 | readonly attribute double fontBoundingBoxAscent; 25 | readonly attribute double fontBoundingBoxDescent; 26 | 27 | readonly attribute Baseline dominantBaseline; 28 | readonly attribute FrozenArray baselines; 29 | readonly attribute FrozenArray fonts; 30 | }; 31 | 32 | [Exposed=Window] 33 | interface Baseline { 34 | readonly attribute DOMString name; 35 | readonly attribute double value; 36 | }; 37 | 38 | [Exposed=Window] 39 | interface Font { 40 | readonly attribute DOMString name; 41 | readonly attribute unsigned long glyphsRendered; 42 | }; 43 | -------------------------------------------------------------------------------- /js_pyi/w3c_webref/ed/idl/fullscreen.idl: -------------------------------------------------------------------------------- 1 | // GENERATED CONTENT - DO NOT EDIT 2 | // Content was automatically extracted by Reffy into webref 3 | // (https://github.com/w3c/webref) 4 | // Source: Fullscreen API Standard (https://fullscreen.spec.whatwg.org/) 5 | 6 | enum FullscreenNavigationUI { 7 | "auto", 8 | "show", 9 | "hide" 10 | }; 11 | 12 | dictionary FullscreenOptions { 13 | FullscreenNavigationUI navigationUI = "auto"; 14 | }; 15 | 16 | partial interface Element { 17 | Promise requestFullscreen(optional FullscreenOptions options = {}); 18 | 19 | attribute EventHandler onfullscreenchange; 20 | attribute EventHandler onfullscreenerror; 21 | }; 22 | 23 | partial interface Document { 24 | [LegacyLenientSetter] readonly attribute boolean fullscreenEnabled; 25 | [LegacyLenientSetter, Unscopable] readonly attribute boolean fullscreen; // historical 26 | 27 | Promise exitFullscreen(); 28 | 29 | attribute EventHandler onfullscreenchange; 30 | attribute EventHandler onfullscreenerror; 31 | }; 32 | 33 | partial interface mixin DocumentOrShadowRoot { 34 | [LegacyLenientSetter] readonly attribute Element? fullscreenElement; 35 | }; 36 | -------------------------------------------------------------------------------- /js_pyi/w3c_webref/ed/idl/gamepad.idl: -------------------------------------------------------------------------------- 1 | // GENERATED CONTENT - DO NOT EDIT 2 | // Content was automatically extracted by Reffy into webref 3 | // (https://github.com/w3c/webref) 4 | // Source: Gamepad (https://w3c.github.io/gamepad/) 5 | 6 | [Exposed=Window, SecureContext] 7 | interface Gamepad { 8 | readonly attribute DOMString id; 9 | readonly attribute long index; 10 | readonly attribute boolean connected; 11 | readonly attribute DOMHighResTimeStamp timestamp; 12 | readonly attribute GamepadMappingType mapping; 13 | readonly attribute FrozenArray axes; 14 | readonly attribute FrozenArray buttons; 15 | }; 16 | 17 | [Exposed=Window, SecureContext] 18 | interface GamepadButton { 19 | readonly attribute boolean pressed; 20 | readonly attribute boolean touched; 21 | readonly attribute double value; 22 | }; 23 | 24 | enum GamepadMappingType { 25 | "", 26 | "standard", 27 | "xr-standard", 28 | }; 29 | 30 | [Exposed=Window] 31 | partial interface Navigator { 32 | sequence getGamepads(); 33 | }; 34 | 35 | [Exposed=Window, SecureContext] 36 | 37 | interface GamepadEvent: Event { 38 | constructor(DOMString type, GamepadEventInit eventInitDict); 39 | [SameObject] readonly attribute Gamepad gamepad; 40 | }; 41 | 42 | dictionary GamepadEventInit : EventInit { 43 | required Gamepad gamepad; 44 | }; 45 | 46 | partial interface mixin WindowEventHandlers { 47 | attribute EventHandler ongamepadconnected; 48 | attribute EventHandler ongamepaddisconnected; 49 | }; 50 | -------------------------------------------------------------------------------- /js_pyi/w3c_webref/ed/idl/generic-sensor.idl: -------------------------------------------------------------------------------- 1 | // GENERATED CONTENT - DO NOT EDIT 2 | // Content was automatically extracted by Reffy into webref 3 | // (https://github.com/w3c/webref) 4 | // Source: Generic Sensor API (https://w3c.github.io/sensors/) 5 | 6 | [SecureContext, Exposed=(DedicatedWorker, Window)] 7 | interface Sensor : EventTarget { 8 | readonly attribute boolean activated; 9 | readonly attribute boolean hasReading; 10 | readonly attribute DOMHighResTimeStamp? timestamp; 11 | undefined start(); 12 | undefined stop(); 13 | attribute EventHandler onreading; 14 | attribute EventHandler onactivate; 15 | attribute EventHandler onerror; 16 | }; 17 | 18 | dictionary SensorOptions { 19 | double frequency; 20 | }; 21 | 22 | [SecureContext, Exposed=(DedicatedWorker, Window)] 23 | interface SensorErrorEvent : Event { 24 | constructor(DOMString type, SensorErrorEventInit errorEventInitDict); 25 | readonly attribute DOMException error; 26 | }; 27 | 28 | dictionary SensorErrorEventInit : EventInit { 29 | required DOMException error; 30 | }; 31 | 32 | dictionary MockSensorConfiguration { 33 | required MockSensorType mockSensorType; 34 | boolean connected = true; 35 | double? maxSamplingFrequency; 36 | double? minSamplingFrequency; 37 | }; 38 | 39 | dictionary MockSensor { 40 | double maxSamplingFrequency; 41 | double minSamplingFrequency; 42 | double requestedSamplingFrequency; 43 | }; 44 | 45 | enum MockSensorType { 46 | "ambient-light", 47 | "accelerometer", 48 | "linear-acceleration", 49 | "gravity", 50 | "gyroscope", 51 | "magnetometer", 52 | "uncalibrated-magnetometer", 53 | "absolute-orientation", 54 | "relative-orientation", 55 | "geolocation", 56 | "proximity", 57 | }; 58 | 59 | dictionary MockSensorReadingValues { 60 | }; 61 | -------------------------------------------------------------------------------- /js_pyi/w3c_webref/ed/idl/geolocation-sensor.idl: -------------------------------------------------------------------------------- 1 | // GENERATED CONTENT - DO NOT EDIT 2 | // Content was automatically extracted by Reffy into webref 3 | // (https://github.com/w3c/webref) 4 | // Source: Geolocation Sensor (https://w3c.github.io/geolocation-sensor/) 5 | 6 | [SecureContext, 7 | Exposed=(DedicatedWorker, Window)] 8 | interface GeolocationSensor : Sensor { 9 | constructor(optional GeolocationSensorOptions options = {}); 10 | static Promise read(optional ReadOptions readOptions = {}); 11 | readonly attribute unrestricted double? latitude; 12 | readonly attribute unrestricted double? longitude; 13 | readonly attribute unrestricted double? altitude; 14 | readonly attribute unrestricted double? accuracy; 15 | readonly attribute unrestricted double? altitudeAccuracy; 16 | readonly attribute unrestricted double? heading; 17 | readonly attribute unrestricted double? speed; 18 | }; 19 | 20 | dictionary GeolocationSensorOptions : SensorOptions { 21 | // placeholder for GeolocationSensor-specific options 22 | }; 23 | 24 | dictionary ReadOptions : GeolocationSensorOptions { 25 | AbortSignal? signal; 26 | }; 27 | 28 | dictionary GeolocationSensorReading { 29 | DOMHighResTimeStamp? timestamp; 30 | double? latitude; 31 | double? longitude; 32 | double? altitude; 33 | double? accuracy; 34 | double? altitudeAccuracy; 35 | double? heading; 36 | double? speed; 37 | }; 38 | 39 | dictionary GeolocationReadingValues { 40 | required double? latitude; 41 | required double? longitude; 42 | required double? altitude; 43 | required double? accuracy; 44 | required double? altitudeAccuracy; 45 | required double? heading; 46 | required double? speed; 47 | }; 48 | -------------------------------------------------------------------------------- /js_pyi/w3c_webref/ed/idl/get-installed-related-apps.idl: -------------------------------------------------------------------------------- 1 | // GENERATED CONTENT - DO NOT EDIT 2 | // Content was automatically extracted by Reffy into webref 3 | // (https://github.com/w3c/webref) 4 | // Source: Get Installed Related Apps API (https://wicg.github.io/get-installed-related-apps/spec/) 5 | 6 | dictionary RelatedApplication { 7 | required USVString platform; 8 | USVString url; 9 | DOMString id; 10 | USVString version; 11 | }; 12 | 13 | [Exposed=Window] 14 | partial interface Navigator { 15 | [SecureContext] Promise> getInstalledRelatedApps(); 16 | }; 17 | -------------------------------------------------------------------------------- /js_pyi/w3c_webref/ed/idl/gyroscope.idl: -------------------------------------------------------------------------------- 1 | // GENERATED CONTENT - DO NOT EDIT 2 | // Content was automatically extracted by Reffy into webref 3 | // (https://github.com/w3c/webref) 4 | // Source: Gyroscope (https://w3c.github.io/gyroscope/) 5 | 6 | [SecureContext, Exposed=Window] 7 | interface Gyroscope : Sensor { 8 | constructor(optional GyroscopeSensorOptions sensorOptions = {}); 9 | readonly attribute double? x; 10 | readonly attribute double? y; 11 | readonly attribute double? z; 12 | }; 13 | 14 | enum GyroscopeLocalCoordinateSystem { "device", "screen" }; 15 | 16 | dictionary GyroscopeSensorOptions : SensorOptions { 17 | GyroscopeLocalCoordinateSystem referenceFrame = "device"; 18 | }; 19 | 20 | dictionary GyroscopeReadingValues { 21 | required double? x; 22 | required double? y; 23 | required double? z; 24 | }; 25 | -------------------------------------------------------------------------------- /js_pyi/w3c_webref/ed/idl/hr-time.idl: -------------------------------------------------------------------------------- 1 | // GENERATED CONTENT - DO NOT EDIT 2 | // Content was automatically extracted by Reffy into webref 3 | // (https://github.com/w3c/webref) 4 | // Source: High Resolution Time (https://w3c.github.io/hr-time/) 5 | 6 | typedef double DOMHighResTimeStamp; 7 | 8 | typedef unsigned long long EpochTimeStamp; 9 | 10 | [Exposed=(Window,Worker)] 11 | interface Performance : EventTarget { 12 | DOMHighResTimeStamp now(); 13 | readonly attribute DOMHighResTimeStamp timeOrigin; 14 | [Default] object toJSON(); 15 | }; 16 | 17 | partial interface mixin WindowOrWorkerGlobalScope { 18 | [Replaceable] readonly attribute Performance performance; 19 | }; 20 | -------------------------------------------------------------------------------- /js_pyi/w3c_webref/ed/idl/html-media-capture.idl: -------------------------------------------------------------------------------- 1 | // GENERATED CONTENT - DO NOT EDIT 2 | // Content was automatically extracted by Reffy into webref 3 | // (https://github.com/w3c/webref) 4 | // Source: HTML Media Capture (https://w3c.github.io/html-media-capture/) 5 | 6 | partial interface HTMLInputElement { 7 | [CEReactions] attribute DOMString capture; 8 | }; 9 | -------------------------------------------------------------------------------- /js_pyi/w3c_webref/ed/idl/idle-detection.idl: -------------------------------------------------------------------------------- 1 | // GENERATED CONTENT - DO NOT EDIT 2 | // Content was automatically extracted by Reffy into webref 3 | // (https://github.com/w3c/webref) 4 | // Source: Idle Detection API (https://wicg.github.io/idle-detection/) 5 | 6 | enum UserIdleState { 7 | "active", 8 | "idle" 9 | }; 10 | 11 | enum ScreenIdleState { 12 | "locked", 13 | "unlocked" 14 | }; 15 | 16 | dictionary IdleOptions { 17 | [EnforceRange] unsigned long long threshold; 18 | AbortSignal signal; 19 | }; 20 | 21 | [ 22 | SecureContext, 23 | Exposed=(Window,DedicatedWorker) 24 | ] interface IdleDetector : EventTarget { 25 | constructor(); 26 | readonly attribute UserIdleState? userState; 27 | readonly attribute ScreenIdleState? screenState; 28 | attribute EventHandler onchange; 29 | [Exposed=Window] static Promise requestPermission(); 30 | Promise start(optional IdleOptions options = {}); 31 | }; 32 | -------------------------------------------------------------------------------- /js_pyi/w3c_webref/ed/idl/image-resource.idl: -------------------------------------------------------------------------------- 1 | // GENERATED CONTENT - DO NOT EDIT 2 | // Content was automatically extracted by Reffy into webref 3 | // (https://github.com/w3c/webref) 4 | // Source: Image Resource (https://w3c.github.io/image-resource/) 5 | 6 | dictionary ImageResource { 7 | required USVString src; 8 | DOMString sizes; 9 | DOMString type; 10 | DOMString label; 11 | }; 12 | -------------------------------------------------------------------------------- /js_pyi/w3c_webref/ed/idl/ink-enhancement.idl: -------------------------------------------------------------------------------- 1 | // GENERATED CONTENT - DO NOT EDIT 2 | // Content was automatically extracted by Reffy into webref 3 | // (https://github.com/w3c/webref) 4 | // Source: Ink API (https://wicg.github.io/ink-enhancement/) 5 | 6 | [Exposed=Window] 7 | interface Ink { 8 | Promise requestPresenter( 9 | optional InkPresenterParam param = {}); 10 | }; 11 | 12 | dictionary InkPresenterParam { 13 | Element? presentationArea = null; 14 | }; 15 | 16 | [Exposed=Window] 17 | interface InkPresenter { 18 | readonly attribute Element? presentationArea; 19 | readonly attribute unsigned long expectedImprovement; 20 | 21 | undefined updateInkTrailStartPoint(PointerEvent event, InkTrailStyle style); 22 | }; 23 | 24 | dictionary InkTrailStyle { 25 | required DOMString color; 26 | required unrestricted double diameter; 27 | }; 28 | 29 | [Exposed=Window] 30 | partial interface Navigator { 31 | [SameObject] readonly attribute Ink ink; 32 | }; 33 | -------------------------------------------------------------------------------- /js_pyi/w3c_webref/ed/idl/input-device-capabilities.idl: -------------------------------------------------------------------------------- 1 | // GENERATED CONTENT - DO NOT EDIT 2 | // Content was automatically extracted by Reffy into webref 3 | // (https://github.com/w3c/webref) 4 | // Source: Input Device Capabilities (https://wicg.github.io/input-device-capabilities/) 5 | 6 | [Exposed=Window] 7 | interface InputDeviceCapabilities { 8 | constructor(optional InputDeviceCapabilitiesInit deviceInitDict = {}); 9 | readonly attribute boolean firesTouchEvents; 10 | readonly attribute boolean pointerMovementScrolls; 11 | }; 12 | 13 | dictionary InputDeviceCapabilitiesInit { 14 | boolean firesTouchEvents = false; 15 | boolean pointerMovementScrolls = false; 16 | }; 17 | 18 | partial interface UIEvent { 19 | readonly attribute InputDeviceCapabilities? sourceCapabilities; 20 | }; 21 | 22 | partial dictionary UIEventInit { 23 | InputDeviceCapabilities? sourceCapabilities = null; 24 | }; 25 | -------------------------------------------------------------------------------- /js_pyi/w3c_webref/ed/idl/input-events.idl: -------------------------------------------------------------------------------- 1 | // GENERATED CONTENT - DO NOT EDIT 2 | // Content was automatically extracted by Reffy into webref 3 | // (https://github.com/w3c/webref) 4 | // Source: Input Events Level 2 (https://w3c.github.io/input-events/) 5 | 6 | partial interface InputEvent { 7 | readonly attribute DataTransfer? dataTransfer; 8 | sequence getTargetRanges(); 9 | }; 10 | 11 | partial dictionary InputEventInit { 12 | DataTransfer? dataTransfer = null; 13 | sequence targetRanges = []; 14 | }; 15 | -------------------------------------------------------------------------------- /js_pyi/w3c_webref/ed/idl/intersection-observer.idl: -------------------------------------------------------------------------------- 1 | // GENERATED CONTENT - DO NOT EDIT 2 | // Content was automatically extracted by Reffy into webref 3 | // (https://github.com/w3c/webref) 4 | // Source: Intersection Observer (https://w3c.github.io/IntersectionObserver/) 5 | 6 | callback IntersectionObserverCallback = undefined (sequence entries, IntersectionObserver observer); 7 | 8 | [Exposed=Window] 9 | interface IntersectionObserver { 10 | constructor(IntersectionObserverCallback callback, optional IntersectionObserverInit options = {}); 11 | readonly attribute (Element or Document)? root; 12 | readonly attribute DOMString rootMargin; 13 | readonly attribute FrozenArray thresholds; 14 | undefined observe(Element target); 15 | undefined unobserve(Element target); 16 | undefined disconnect(); 17 | sequence takeRecords(); 18 | }; 19 | 20 | [Exposed=Window] 21 | interface IntersectionObserverEntry { 22 | constructor(IntersectionObserverEntryInit intersectionObserverEntryInit); 23 | readonly attribute DOMHighResTimeStamp time; 24 | readonly attribute DOMRectReadOnly? rootBounds; 25 | readonly attribute DOMRectReadOnly boundingClientRect; 26 | readonly attribute DOMRectReadOnly intersectionRect; 27 | readonly attribute boolean isIntersecting; 28 | readonly attribute double intersectionRatio; 29 | readonly attribute Element target; 30 | }; 31 | 32 | dictionary IntersectionObserverEntryInit { 33 | required DOMHighResTimeStamp time; 34 | required DOMRectInit? rootBounds; 35 | required DOMRectInit boundingClientRect; 36 | required DOMRectInit intersectionRect; 37 | required boolean isIntersecting; 38 | required double intersectionRatio; 39 | required Element target; 40 | }; 41 | 42 | dictionary IntersectionObserverInit { 43 | (Element or Document)? root = null; 44 | DOMString rootMargin = "0px"; 45 | (double or sequence) threshold = 0; 46 | }; 47 | -------------------------------------------------------------------------------- /js_pyi/w3c_webref/ed/idl/intervention-reporting.idl: -------------------------------------------------------------------------------- 1 | // GENERATED CONTENT - DO NOT EDIT 2 | // Content was automatically extracted by Reffy into webref 3 | // (https://github.com/w3c/webref) 4 | // Source: Intervention Reporting (https://wicg.github.io/intervention-reporting/) 5 | 6 | [Exposed=(Window,Worker)] 7 | interface InterventionReportBody : ReportBody { 8 | [Default] object toJSON(); 9 | readonly attribute DOMString id; 10 | readonly attribute DOMString message; 11 | readonly attribute DOMString? sourceFile; 12 | readonly attribute unsigned long? lineNumber; 13 | readonly attribute unsigned long? columnNumber; 14 | }; 15 | -------------------------------------------------------------------------------- /js_pyi/w3c_webref/ed/idl/is-input-pending.idl: -------------------------------------------------------------------------------- 1 | // GENERATED CONTENT - DO NOT EDIT 2 | // Content was automatically extracted by Reffy into webref 3 | // (https://github.com/w3c/webref) 4 | // Source: Early detection of input events (https://wicg.github.io/is-input-pending/) 5 | 6 | dictionary IsInputPendingOptions { 7 | boolean includeContinuous = false; 8 | }; 9 | 10 | [Exposed=Window] interface Scheduling { 11 | boolean isInputPending(optional IsInputPendingOptions isInputPendingOptions = {}); 12 | }; 13 | 14 | partial interface Navigator { 15 | readonly attribute Scheduling scheduling; 16 | }; 17 | -------------------------------------------------------------------------------- /js_pyi/w3c_webref/ed/idl/js-self-profiling.idl: -------------------------------------------------------------------------------- 1 | // GENERATED CONTENT - DO NOT EDIT 2 | // Content was automatically extracted by Reffy into webref 3 | // (https://github.com/w3c/webref) 4 | // Source: JS Self-Profiling API (https://wicg.github.io/js-self-profiling/) 5 | 6 | [Exposed=Window] 7 | interface Profiler : EventTarget { 8 | readonly attribute DOMHighResTimeStamp sampleInterval; 9 | readonly attribute boolean stopped; 10 | 11 | constructor(ProfilerInitOptions options); 12 | Promise stop(); 13 | }; 14 | 15 | typedef DOMString ProfilerResource; 16 | 17 | dictionary ProfilerTrace { 18 | required sequence resources; 19 | required sequence frames; 20 | required sequence stacks; 21 | required sequence samples; 22 | }; 23 | 24 | dictionary ProfilerSample { 25 | required DOMHighResTimeStamp timestamp; 26 | unsigned long long stackId; 27 | }; 28 | 29 | dictionary ProfilerStack { 30 | unsigned long long parentId; 31 | required unsigned long long frameId; 32 | }; 33 | 34 | dictionary ProfilerFrame { 35 | required DOMString name; 36 | unsigned long long resourceId; 37 | unsigned long long line; 38 | unsigned long long column; 39 | }; 40 | 41 | dictionary ProfilerInitOptions { 42 | required DOMHighResTimeStamp sampleInterval; 43 | required unsigned long maxBufferSize; 44 | }; 45 | -------------------------------------------------------------------------------- /js_pyi/w3c_webref/ed/idl/json-ld-framing.idl: -------------------------------------------------------------------------------- 1 | // GENERATED CONTENT - DO NOT EDIT 2 | // Content was automatically extracted by Reffy into webref 3 | // (https://github.com/w3c/webref) 4 | // Source: JSON-LD 1.1 Framing (https://w3c.github.io/json-ld-framing/) 5 | 6 | [Exposed=JsonLd] 7 | partial interface JsonLdProcessor { 8 | static Promise frame( 9 | JsonLdInput input, 10 | JsonLdInput frame, 11 | optional JsonLdOptions options = {}); 12 | }; 13 | 14 | dictionary JsonLdFramingError { 15 | JsonLdFramingErrorCode code; 16 | USVString? message = null; 17 | }; 18 | enum JsonLdFramingErrorCode { 19 | "invalid frame", 20 | "invalid @embed value" 21 | }; 22 | 23 | partial dictionary JsonLdOptions { 24 | (JsonLdEmbed or boolean) embed = "@once"; 25 | boolean explicit = false; 26 | boolean omitDefault = false; 27 | boolean omitGraph; 28 | boolean requireAll = false; 29 | boolean frameDefault = false; 30 | }; 31 | 32 | enum JsonLdEmbed { 33 | "@always", 34 | "@once", 35 | "@never" 36 | }; 37 | -------------------------------------------------------------------------------- /js_pyi/w3c_webref/ed/idl/keyboard-lock.idl: -------------------------------------------------------------------------------- 1 | // GENERATED CONTENT - DO NOT EDIT 2 | // Content was automatically extracted by Reffy into webref 3 | // (https://github.com/w3c/webref) 4 | // Source: Keyboard Lock (https://wicg.github.io/keyboard-lock/) 5 | 6 | partial interface Navigator { 7 | [SecureContext, SameObject] readonly attribute Keyboard keyboard; 8 | }; 9 | 10 | [SecureContext, Exposed=Window] 11 | interface Keyboard : EventTarget { 12 | Promise lock(optional sequence keyCodes = []); 13 | undefined unlock(); 14 | }; 15 | -------------------------------------------------------------------------------- /js_pyi/w3c_webref/ed/idl/keyboard-map.idl: -------------------------------------------------------------------------------- 1 | // GENERATED CONTENT - DO NOT EDIT 2 | // Content was automatically extracted by Reffy into webref 3 | // (https://github.com/w3c/webref) 4 | // Source: Keyboard Map (https://wicg.github.io/keyboard-map/) 5 | 6 | [Exposed=Window] 7 | interface KeyboardLayoutMap { 8 | readonly maplike; 9 | }; 10 | 11 | partial interface Keyboard { 12 | Promise getLayoutMap(); 13 | 14 | attribute EventHandler onlayoutchange; 15 | }; 16 | -------------------------------------------------------------------------------- /js_pyi/w3c_webref/ed/idl/largest-contentful-paint.idl: -------------------------------------------------------------------------------- 1 | // GENERATED CONTENT - DO NOT EDIT 2 | // Content was automatically extracted by Reffy into webref 3 | // (https://github.com/w3c/webref) 4 | // Source: Largest Contentful Paint (https://w3c.github.io/largest-contentful-paint/) 5 | 6 | [Exposed=Window] 7 | interface LargestContentfulPaint : PerformanceEntry { 8 | readonly attribute DOMHighResTimeStamp renderTime; 9 | readonly attribute DOMHighResTimeStamp loadTime; 10 | readonly attribute unsigned long size; 11 | readonly attribute DOMString id; 12 | readonly attribute DOMString url; 13 | readonly attribute Element? element; 14 | [Default] object toJSON(); 15 | }; 16 | -------------------------------------------------------------------------------- /js_pyi/w3c_webref/ed/idl/layout-instability.idl: -------------------------------------------------------------------------------- 1 | // GENERATED CONTENT - DO NOT EDIT 2 | // Content was automatically extracted by Reffy into webref 3 | // (https://github.com/w3c/webref) 4 | // Source: Layout Instability API (https://wicg.github.io/layout-instability/) 5 | 6 | [Exposed=Window] 7 | interface LayoutShift : PerformanceEntry { 8 | readonly attribute double value; 9 | readonly attribute boolean hadRecentInput; 10 | readonly attribute DOMHighResTimeStamp lastInputTime; 11 | readonly attribute FrozenArray sources; 12 | [Default] object toJSON(); 13 | }; 14 | 15 | [Exposed=Window] 16 | interface LayoutShiftAttribution { 17 | readonly attribute Node? node; 18 | readonly attribute DOMRectReadOnly previousRect; 19 | readonly attribute DOMRectReadOnly currentRect; 20 | }; 21 | -------------------------------------------------------------------------------- /js_pyi/w3c_webref/ed/idl/local-font-access.idl: -------------------------------------------------------------------------------- 1 | // GENERATED CONTENT - DO NOT EDIT 2 | // Content was automatically extracted by Reffy into webref 3 | // (https://github.com/w3c/webref) 4 | // Source: Local Font Access API (https://wicg.github.io/local-font-access/) 5 | 6 | [SecureContext] 7 | partial interface Window { 8 | Promise> queryLocalFonts(optional QueryOptions options = {}); 9 | }; 10 | 11 | dictionary QueryOptions { 12 | sequence postscriptNames; 13 | }; 14 | 15 | [Exposed=Window] 16 | interface FontData { 17 | Promise blob(); 18 | 19 | // Names 20 | readonly attribute USVString postscriptName; 21 | readonly attribute USVString fullName; 22 | readonly attribute USVString family; 23 | readonly attribute USVString style; 24 | }; 25 | -------------------------------------------------------------------------------- /js_pyi/w3c_webref/ed/idl/longtasks.idl: -------------------------------------------------------------------------------- 1 | // GENERATED CONTENT - DO NOT EDIT 2 | // Content was automatically extracted by Reffy into webref 3 | // (https://github.com/w3c/webref) 4 | // Source: Long Tasks API (https://w3c.github.io/longtasks/) 5 | 6 | [Exposed=Window] 7 | interface PerformanceLongTaskTiming : PerformanceEntry { 8 | readonly attribute FrozenArray attribution; 9 | [Default] object toJSON(); 10 | }; 11 | 12 | [Exposed=Window] 13 | interface TaskAttributionTiming : PerformanceEntry { 14 | readonly attribute DOMString containerType; 15 | readonly attribute DOMString containerSrc; 16 | readonly attribute DOMString containerId; 17 | readonly attribute DOMString containerName; 18 | [Default] object toJSON(); 19 | }; 20 | -------------------------------------------------------------------------------- /js_pyi/w3c_webref/ed/idl/magnetometer.idl: -------------------------------------------------------------------------------- 1 | // GENERATED CONTENT - DO NOT EDIT 2 | // Content was automatically extracted by Reffy into webref 3 | // (https://github.com/w3c/webref) 4 | // Source: Magnetometer (https://w3c.github.io/magnetometer/) 5 | 6 | [SecureContext, 7 | Exposed=Window] 8 | interface Magnetometer : Sensor { 9 | constructor(optional MagnetometerSensorOptions sensorOptions = {}); 10 | readonly attribute double? x; 11 | readonly attribute double? y; 12 | readonly attribute double? z; 13 | }; 14 | 15 | enum MagnetometerLocalCoordinateSystem { "device", "screen" }; 16 | 17 | dictionary MagnetometerSensorOptions : SensorOptions { 18 | MagnetometerLocalCoordinateSystem referenceFrame = "device"; 19 | }; 20 | 21 | [SecureContext, 22 | Exposed=Window] 23 | interface UncalibratedMagnetometer : Sensor { 24 | constructor(optional MagnetometerSensorOptions sensorOptions = {}); 25 | readonly attribute double? x; 26 | readonly attribute double? y; 27 | readonly attribute double? z; 28 | readonly attribute double? xBias; 29 | readonly attribute double? yBias; 30 | readonly attribute double? zBias; 31 | }; 32 | 33 | dictionary MagnetometerReadingValues { 34 | required double? x; 35 | required double? y; 36 | required double? z; 37 | }; 38 | 39 | dictionary UncalibratedMagnetometerReadingValues { 40 | required double? x; 41 | required double? y; 42 | required double? z; 43 | required double? xBias; 44 | required double? yBias; 45 | required double? zBias; 46 | }; 47 | -------------------------------------------------------------------------------- /js_pyi/w3c_webref/ed/idl/manifest-incubations.idl: -------------------------------------------------------------------------------- 1 | // GENERATED CONTENT - DO NOT EDIT 2 | // Content was automatically extracted by Reffy into webref 3 | // (https://github.com/w3c/webref) 4 | // Source: Manifest Incubations (https://wicg.github.io/manifest-incubations/) 5 | 6 | [Exposed=Window] 7 | interface BeforeInstallPromptEvent : Event { 8 | constructor(DOMString type, optional EventInit eventInitDict = {}); 9 | Promise prompt(); 10 | }; 11 | 12 | dictionary PromptResponseObject { 13 | AppBannerPromptOutcome userChoice; 14 | }; 15 | 16 | enum AppBannerPromptOutcome { 17 | "accepted", 18 | "dismissed" 19 | }; 20 | 21 | partial interface Window { 22 | attribute EventHandler onappinstalled; 23 | attribute EventHandler onbeforeinstallprompt; 24 | }; 25 | -------------------------------------------------------------------------------- /js_pyi/w3c_webref/ed/idl/mathml-core.idl: -------------------------------------------------------------------------------- 1 | // GENERATED CONTENT - DO NOT EDIT 2 | // Content was automatically extracted by Reffy into webref 3 | // (https://github.com/w3c/webref) 4 | // Source: MathML Core (https://w3c.github.io/mathml-core/) 5 | 6 | [Exposed=Window] 7 | interface MathMLElement : Element { }; 8 | MathMLElement includes GlobalEventHandlers; 9 | MathMLElement includes HTMLOrSVGElement; 10 | -------------------------------------------------------------------------------- /js_pyi/w3c_webref/ed/idl/media-playback-quality.idl: -------------------------------------------------------------------------------- 1 | // GENERATED CONTENT - DO NOT EDIT 2 | // Content was automatically extracted by Reffy into webref 3 | // (https://github.com/w3c/webref) 4 | // Source: Media Playback Quality (https://w3c.github.io/media-playback-quality/) 5 | 6 | partial interface HTMLVideoElement { 7 | VideoPlaybackQuality getVideoPlaybackQuality(); 8 | }; 9 | 10 | [Exposed=Window] 11 | interface VideoPlaybackQuality { 12 | readonly attribute DOMHighResTimeStamp creationTime; 13 | readonly attribute unsigned long droppedVideoFrames; 14 | readonly attribute unsigned long totalVideoFrames; 15 | 16 | // Deprecated! 17 | readonly attribute unsigned long corruptedVideoFrames; 18 | }; 19 | -------------------------------------------------------------------------------- /js_pyi/w3c_webref/ed/idl/mediacapture-automation.idl: -------------------------------------------------------------------------------- 1 | // GENERATED CONTENT - DO NOT EDIT 2 | // Content was automatically extracted by Reffy into webref 3 | // (https://github.com/w3c/webref) 4 | // Source: Media Capture Automation (https://w3c.github.io/mediacapture-automation/) 5 | 6 | enum MockCapturePromptResult { 7 | "granted", 8 | "denied" 9 | }; 10 | 11 | dictionary MockCapturePromptResultConfiguration { 12 | MockCapturePromptResult getUserMedia; 13 | MockCapturePromptResult getDisplayMedia; 14 | }; 15 | 16 | dictionary MockCaptureDeviceConfiguration { 17 | DOMString label; 18 | DOMString deviceId; 19 | DOMString groupId; 20 | }; 21 | 22 | dictionary MockCameraConfiguration : MockCaptureDeviceConfiguration { 23 | double defaultFrameRate = 30; 24 | DOMString facingMode = "user"; 25 | // TODO: Add more capabilities parameters like: 26 | // ULongRange width; 27 | // ULongRange height; 28 | // DoubleRange frameRate; 29 | }; 30 | 31 | dictionary MockMicrophoneConfiguration : MockCaptureDeviceConfiguration { 32 | unsigned long defaultSampleRate = 44100; 33 | // TODO: Add more capabilities parameters like: 34 | // ULongRange sampleRate; 35 | // sequence echoCancellation; 36 | }; 37 | -------------------------------------------------------------------------------- /js_pyi/w3c_webref/ed/idl/mediacapture-fromelement.idl: -------------------------------------------------------------------------------- 1 | // GENERATED CONTENT - DO NOT EDIT 2 | // Content was automatically extracted by Reffy into webref 3 | // (https://github.com/w3c/webref) 4 | // Source: Media Capture from DOM Elements (https://w3c.github.io/mediacapture-fromelement/) 5 | 6 | partial interface HTMLMediaElement { 7 | MediaStream captureStream (); 8 | }; 9 | 10 | partial interface HTMLCanvasElement { 11 | MediaStream captureStream (optional double frameRequestRate); 12 | }; 13 | 14 | [Exposed=Window] interface CanvasCaptureMediaStreamTrack : MediaStreamTrack { 15 | readonly attribute HTMLCanvasElement canvas; 16 | undefined requestFrame (); 17 | }; 18 | -------------------------------------------------------------------------------- /js_pyi/w3c_webref/ed/idl/mediacapture-handle-actions.idl: -------------------------------------------------------------------------------- 1 | // GENERATED CONTENT - DO NOT EDIT 2 | // Content was automatically extracted by Reffy into webref 3 | // (https://github.com/w3c/webref) 4 | // Source: The Capture-Handle Actions Mechanism (https://w3c.github.io/mediacapture-handle/actions/) 5 | 6 | partial interface MediaDevices { 7 | undefined setSupportedCaptureActions(sequence actions); 8 | attribute EventHandler oncaptureaction; 9 | }; 10 | 11 | enum CaptureAction { 12 | "next", 13 | "previous", 14 | "first", 15 | "last" 16 | }; 17 | 18 | [Exposed=Window] 19 | interface CaptureActionEvent : Event { 20 | constructor(optional CaptureActionEventInit init = {}); 21 | readonly attribute CaptureAction action; 22 | }; 23 | 24 | dictionary CaptureActionEventInit : EventInit { 25 | DOMString action; 26 | }; 27 | 28 | partial interface MediaStreamTrack { 29 | sequence getSupportedCaptureActions(); 30 | Promise sendCaptureAction(CaptureAction action); 31 | }; 32 | -------------------------------------------------------------------------------- /js_pyi/w3c_webref/ed/idl/mediacapture-region.idl: -------------------------------------------------------------------------------- 1 | // GENERATED CONTENT - DO NOT EDIT 2 | // Content was automatically extracted by Reffy into webref 3 | // (https://github.com/w3c/webref) 4 | // Source: Region Capture (https://w3c.github.io/mediacapture-region/) 5 | 6 | [Exposed=(Window,Worker), Serializable] 7 | interface CropTarget { 8 | [Exposed=Window, SecureContext] static Promise fromElement(Element element); 9 | }; 10 | 11 | [Exposed = Window] 12 | interface BrowserCaptureMediaStreamTrack : MediaStreamTrack { 13 | Promise cropTo(CropTarget? cropTarget); 14 | BrowserCaptureMediaStreamTrack clone(); 15 | }; 16 | -------------------------------------------------------------------------------- /js_pyi/w3c_webref/ed/idl/mediacapture-transform.idl: -------------------------------------------------------------------------------- 1 | // GENERATED CONTENT - DO NOT EDIT 2 | // Content was automatically extracted by Reffy into webref 3 | // (https://github.com/w3c/webref) 4 | // Source: MediaStreamTrack Insertable Media Processing using Streams (https://w3c.github.io/mediacapture-transform/) 5 | 6 | [Exposed=DedicatedWorker] 7 | interface MediaStreamTrackProcessor { 8 | constructor(MediaStreamTrackProcessorInit init); 9 | attribute ReadableStream readable; 10 | }; 11 | 12 | dictionary MediaStreamTrackProcessorInit { 13 | required MediaStreamTrack track; 14 | [EnforceRange] unsigned short maxBufferSize; 15 | }; 16 | 17 | [Exposed=DedicatedWorker] 18 | interface VideoTrackGenerator { 19 | constructor(); 20 | readonly attribute WritableStream writable; 21 | attribute boolean muted; 22 | readonly attribute MediaStreamTrack track; 23 | }; 24 | -------------------------------------------------------------------------------- /js_pyi/w3c_webref/ed/idl/mediacapture-viewport.idl: -------------------------------------------------------------------------------- 1 | // GENERATED CONTENT - DO NOT EDIT 2 | // Content was automatically extracted by Reffy into webref 3 | // (https://github.com/w3c/webref) 4 | // Source: Viewport Capture (https://w3c.github.io/mediacapture-viewport/) 5 | 6 | partial interface MediaDevices { 7 | Promise getViewportMedia( 8 | optional ViewportMediaStreamConstraints constraints = {}); 9 | }; 10 | 11 | dictionary ViewportMediaStreamConstraints { 12 | (boolean or MediaTrackConstraints) video = true; 13 | (boolean or MediaTrackConstraints) audio = false; 14 | }; 15 | -------------------------------------------------------------------------------- /js_pyi/w3c_webref/ed/idl/model-element.idl: -------------------------------------------------------------------------------- 1 | // GENERATED CONTENT - DO NOT EDIT 2 | // Content was automatically extracted by Reffy into webref 3 | // (https://github.com/w3c/webref) 4 | // Source: The element (https://immersive-web.github.io/model-element/) 5 | 6 | [Exposed=Window] 7 | interface HTMLModelElement : HTMLElement { 8 | 9 | }; 10 | -------------------------------------------------------------------------------- /js_pyi/w3c_webref/ed/idl/mst-content-hint.idl: -------------------------------------------------------------------------------- 1 | // GENERATED CONTENT - DO NOT EDIT 2 | // Content was automatically extracted by Reffy into webref 3 | // (https://github.com/w3c/webref) 4 | // Source: MediaStreamTrack Content Hints (https://w3c.github.io/mst-content-hint/) 5 | 6 | partial interface MediaStreamTrack { 7 | attribute DOMString contentHint; 8 | }; 9 | 10 | enum RTCDegradationPreference { 11 | "maintain-framerate", 12 | "maintain-resolution", 13 | "balanced" 14 | }; 15 | 16 | partial dictionary RTCRtpSendParameters { 17 | RTCDegradationPreference degradationPreference; 18 | }; 19 | -------------------------------------------------------------------------------- /js_pyi/w3c_webref/ed/idl/netinfo.idl: -------------------------------------------------------------------------------- 1 | // GENERATED CONTENT - DO NOT EDIT 2 | // Content was automatically extracted by Reffy into webref 3 | // (https://github.com/w3c/webref) 4 | // Source: Network Information API (https://wicg.github.io/netinfo/) 5 | 6 | enum ConnectionType { 7 | "bluetooth", 8 | "cellular", 9 | "ethernet", 10 | "mixed", 11 | "none", 12 | "other", 13 | "unknown", 14 | "wifi", 15 | "wimax" 16 | }; 17 | 18 | enum EffectiveConnectionType { 19 | "2g", 20 | "3g", 21 | "4g", 22 | "slow-2g" 23 | }; 24 | 25 | interface mixin NavigatorNetworkInformation { 26 | [SameObject] readonly attribute NetworkInformation connection; 27 | }; 28 | 29 | Navigator includes NavigatorNetworkInformation; 30 | WorkerNavigator includes NavigatorNetworkInformation; 31 | 32 | [Exposed=(Window,Worker)] 33 | interface NetworkInformation : EventTarget { 34 | readonly attribute ConnectionType type; 35 | readonly attribute EffectiveConnectionType effectiveType; 36 | readonly attribute Megabit downlinkMax; 37 | readonly attribute Megabit downlink; 38 | readonly attribute Millisecond rtt; 39 | attribute EventHandler onchange; 40 | }; 41 | 42 | typedef unrestricted double Megabit; 43 | typedef unsigned long long Millisecond; 44 | -------------------------------------------------------------------------------- /js_pyi/w3c_webref/ed/idl/orientation-sensor.idl: -------------------------------------------------------------------------------- 1 | // GENERATED CONTENT - DO NOT EDIT 2 | // Content was automatically extracted by Reffy into webref 3 | // (https://github.com/w3c/webref) 4 | // Source: Orientation Sensor (https://w3c.github.io/orientation-sensor/) 5 | 6 | typedef (Float32Array or Float64Array or DOMMatrix) RotationMatrixType; 7 | 8 | [SecureContext, Exposed=Window] 9 | interface OrientationSensor : Sensor { 10 | readonly attribute FrozenArray? quaternion; 11 | undefined populateMatrix(RotationMatrixType targetMatrix); 12 | }; 13 | 14 | enum OrientationSensorLocalCoordinateSystem { "device", "screen" }; 15 | 16 | dictionary OrientationSensorOptions : SensorOptions { 17 | OrientationSensorLocalCoordinateSystem referenceFrame = "device"; 18 | }; 19 | 20 | [SecureContext, Exposed=Window] 21 | interface AbsoluteOrientationSensor : OrientationSensor { 22 | constructor(optional OrientationSensorOptions sensorOptions = {}); 23 | }; 24 | 25 | [SecureContext, Exposed=Window] 26 | interface RelativeOrientationSensor : OrientationSensor { 27 | constructor(optional OrientationSensorOptions sensorOptions = {}); 28 | }; 29 | 30 | dictionary AbsoluteOrientationReadingValues { 31 | required FrozenArray? quaternion; 32 | }; 33 | 34 | dictionary RelativeOrientationReadingValues : AbsoluteOrientationReadingValues { 35 | }; 36 | -------------------------------------------------------------------------------- /js_pyi/w3c_webref/ed/idl/page-lifecycle.idl: -------------------------------------------------------------------------------- 1 | // GENERATED CONTENT - DO NOT EDIT 2 | // Content was automatically extracted by Reffy into webref 3 | // (https://github.com/w3c/webref) 4 | // Source: Page Lifecycle (https://wicg.github.io/page-lifecycle/) 5 | 6 | partial interface Document { 7 | attribute EventHandler onfreeze; 8 | attribute EventHandler onresume; 9 | readonly attribute boolean wasDiscarded; 10 | }; 11 | 12 | partial interface Client { 13 | readonly attribute ClientLifecycleState lifecycleState; 14 | }; 15 | 16 | enum ClientLifecycleState { 17 | "active", 18 | "frozen" 19 | }; 20 | -------------------------------------------------------------------------------- /js_pyi/w3c_webref/ed/idl/paint-timing.idl: -------------------------------------------------------------------------------- 1 | // GENERATED CONTENT - DO NOT EDIT 2 | // Content was automatically extracted by Reffy into webref 3 | // (https://github.com/w3c/webref) 4 | // Source: Paint Timing 1 (https://w3c.github.io/paint-timing/) 5 | 6 | [Exposed=Window] 7 | interface PerformancePaintTiming : PerformanceEntry {}; 8 | -------------------------------------------------------------------------------- /js_pyi/w3c_webref/ed/idl/performance-measure-memory.idl: -------------------------------------------------------------------------------- 1 | // GENERATED CONTENT - DO NOT EDIT 2 | // Content was automatically extracted by Reffy into webref 3 | // (https://github.com/w3c/webref) 4 | // Source: Measure Memory API (https://wicg.github.io/performance-measure-memory/) 5 | 6 | dictionary MemoryMeasurement { 7 | unsigned long long bytes; 8 | sequence breakdown; 9 | }; 10 | 11 | dictionary MemoryBreakdownEntry { 12 | unsigned long long bytes; 13 | sequence attribution; 14 | sequence types; 15 | }; 16 | 17 | dictionary MemoryAttribution { 18 | USVString url; 19 | MemoryAttributionContainer container; 20 | DOMString scope; 21 | }; 22 | 23 | dictionary MemoryAttributionContainer { 24 | DOMString id; 25 | USVString src; 26 | }; 27 | 28 | partial interface Performance { 29 | [Exposed=(Window,ServiceWorker,SharedWorker), CrossOriginIsolated] Promise measureUserAgentSpecificMemory(); 30 | }; 31 | -------------------------------------------------------------------------------- /js_pyi/w3c_webref/ed/idl/periodic-background-sync.idl: -------------------------------------------------------------------------------- 1 | // GENERATED CONTENT - DO NOT EDIT 2 | // Content was automatically extracted by Reffy into webref 3 | // (https://github.com/w3c/webref) 4 | // Source: Web Periodic Background Synchronization (https://wicg.github.io/periodic-background-sync/) 5 | 6 | partial interface ServiceWorkerGlobalScope { 7 | attribute EventHandler onperiodicsync; 8 | }; 9 | 10 | [Exposed=(Window,Worker)] 11 | partial interface ServiceWorkerRegistration { 12 | readonly attribute PeriodicSyncManager periodicSync; 13 | }; 14 | 15 | [Exposed=(Window,Worker)] 16 | interface PeriodicSyncManager { 17 | Promise register(DOMString tag, optional BackgroundSyncOptions options = {}); 18 | Promise> getTags(); 19 | Promise unregister(DOMString tag); 20 | }; 21 | 22 | dictionary BackgroundSyncOptions { 23 | [EnforceRange] unsigned long long minInterval = 0; 24 | }; 25 | 26 | dictionary PeriodicSyncEventInit : ExtendableEventInit { 27 | required DOMString tag; 28 | }; 29 | 30 | [Exposed=ServiceWorker] 31 | interface PeriodicSyncEvent : ExtendableEvent { 32 | constructor(DOMString type, PeriodicSyncEventInit init); 33 | readonly attribute DOMString tag; 34 | }; 35 | -------------------------------------------------------------------------------- /js_pyi/w3c_webref/ed/idl/permissions-policy.idl: -------------------------------------------------------------------------------- 1 | // GENERATED CONTENT - DO NOT EDIT 2 | // Content was automatically extracted by Reffy into webref 3 | // (https://github.com/w3c/webref) 4 | // Source: Permissions Policy (https://w3c.github.io/webappsec-permissions-policy/) 5 | 6 | [Exposed=Window] 7 | interface PermissionsPolicy { 8 | boolean allowsFeature(DOMString feature, optional DOMString origin); 9 | sequence features(); 10 | sequence allowedFeatures(); 11 | sequence getAllowlistForFeature(DOMString feature); 12 | }; 13 | 14 | partial interface Document { 15 | [SameObject] readonly attribute PermissionsPolicy permissionsPolicy; 16 | }; 17 | 18 | partial interface HTMLIFrameElement { 19 | [SameObject] readonly attribute PermissionsPolicy permissionsPolicy; 20 | }; 21 | 22 | [Exposed=Window] 23 | interface PermissionsPolicyViolationReportBody : ReportBody { 24 | readonly attribute DOMString featureId; 25 | readonly attribute DOMString? sourceFile; 26 | readonly attribute long? lineNumber; 27 | readonly attribute long? columnNumber; 28 | readonly attribute DOMString disposition; 29 | }; 30 | -------------------------------------------------------------------------------- /js_pyi/w3c_webref/ed/idl/permissions-request.idl: -------------------------------------------------------------------------------- 1 | // GENERATED CONTENT - DO NOT EDIT 2 | // Content was automatically extracted by Reffy into webref 3 | // (https://github.com/w3c/webref) 4 | // Source: Requesting Permissions (https://wicg.github.io/permissions-request/) 5 | 6 | partial interface Permissions { 7 | Promise request(object permissionDesc); 8 | }; 9 | -------------------------------------------------------------------------------- /js_pyi/w3c_webref/ed/idl/permissions-revoke.idl: -------------------------------------------------------------------------------- 1 | // GENERATED CONTENT - DO NOT EDIT 2 | // Content was automatically extracted by Reffy into webref 3 | // (https://github.com/w3c/webref) 4 | // Source: Relinquishing Permissions (https://wicg.github.io/permissions-revoke/) 5 | 6 | partial interface Permissions { 7 | Promise revoke(object permissionDesc); 8 | }; 9 | -------------------------------------------------------------------------------- /js_pyi/w3c_webref/ed/idl/permissions.idl: -------------------------------------------------------------------------------- 1 | // GENERATED CONTENT - DO NOT EDIT 2 | // Content was automatically extracted by Reffy into webref 3 | // (https://github.com/w3c/webref) 4 | // Source: Permissions (https://w3c.github.io/permissions/) 5 | 6 | [Exposed=(Window)] 7 | partial interface Navigator { 8 | [SameObject] readonly attribute Permissions permissions; 9 | }; 10 | 11 | [Exposed=(Worker)] 12 | partial interface WorkerNavigator { 13 | [SameObject] readonly attribute Permissions permissions; 14 | }; 15 | 16 | [Exposed=(Window,Worker)] 17 | interface Permissions { 18 | Promise query(object permissionDesc); 19 | }; 20 | 21 | dictionary PermissionDescriptor { 22 | required DOMString name; 23 | }; 24 | 25 | [Exposed=(Window,Worker)] 26 | interface PermissionStatus : EventTarget { 27 | readonly attribute PermissionState state; 28 | readonly attribute DOMString name; 29 | attribute EventHandler onchange; 30 | }; 31 | 32 | enum PermissionState { 33 | "granted", 34 | "denied", 35 | "prompt", 36 | }; 37 | 38 | dictionary PermissionSetParameters { 39 | required PermissionDescriptor descriptor; 40 | required PermissionState state; 41 | }; 42 | -------------------------------------------------------------------------------- /js_pyi/w3c_webref/ed/idl/picture-in-picture.idl: -------------------------------------------------------------------------------- 1 | // GENERATED CONTENT - DO NOT EDIT 2 | // Content was automatically extracted by Reffy into webref 3 | // (https://github.com/w3c/webref) 4 | // Source: Picture-in-Picture (https://w3c.github.io/picture-in-picture/) 5 | 6 | partial interface HTMLVideoElement { 7 | [NewObject] Promise requestPictureInPicture(); 8 | 9 | attribute EventHandler onenterpictureinpicture; 10 | attribute EventHandler onleavepictureinpicture; 11 | 12 | [CEReactions] attribute boolean disablePictureInPicture; 13 | }; 14 | 15 | partial interface Document { 16 | readonly attribute boolean pictureInPictureEnabled; 17 | 18 | [NewObject] Promise exitPictureInPicture(); 19 | }; 20 | 21 | partial interface mixin DocumentOrShadowRoot { 22 | readonly attribute Element? pictureInPictureElement; 23 | }; 24 | 25 | [Exposed=Window] 26 | interface PictureInPictureWindow : EventTarget { 27 | readonly attribute long width; 28 | readonly attribute long height; 29 | 30 | attribute EventHandler onresize; 31 | }; 32 | 33 | [Exposed=Window] 34 | interface PictureInPictureEvent : Event { 35 | constructor(DOMString type, PictureInPictureEventInit eventInitDict); 36 | [SameObject] readonly attribute PictureInPictureWindow pictureInPictureWindow; 37 | }; 38 | 39 | dictionary PictureInPictureEventInit : EventInit { 40 | required PictureInPictureWindow pictureInPictureWindow; 41 | }; 42 | -------------------------------------------------------------------------------- /js_pyi/w3c_webref/ed/idl/pointerlock.idl: -------------------------------------------------------------------------------- 1 | // GENERATED CONTENT - DO NOT EDIT 2 | // Content was automatically extracted by Reffy into webref 3 | // (https://github.com/w3c/webref) 4 | // Source: Pointer Lock 2.0 (https://w3c.github.io/pointerlock/) 5 | 6 | partial interface Element { 7 | undefined requestPointerLock(); 8 | }; 9 | 10 | partial interface Document { 11 | attribute EventHandler onpointerlockchange; 12 | attribute EventHandler onpointerlockerror; 13 | undefined exitPointerLock(); 14 | }; 15 | 16 | partial interface mixin DocumentOrShadowRoot { 17 | readonly attribute Element ? pointerLockElement; 18 | }; 19 | 20 | partial interface MouseEvent { 21 | readonly attribute double movementX; 22 | readonly attribute double movementY; 23 | }; 24 | 25 | partial dictionary MouseEventInit { 26 | double movementX = 0; 27 | double movementY = 0; 28 | }; 29 | -------------------------------------------------------------------------------- /js_pyi/w3c_webref/ed/idl/portals.idl: -------------------------------------------------------------------------------- 1 | // GENERATED CONTENT - DO NOT EDIT 2 | // Content was automatically extracted by Reffy into webref 3 | // (https://github.com/w3c/webref) 4 | // Source: Portals (https://wicg.github.io/portals/) 5 | 6 | [Exposed=Window] 7 | interface HTMLPortalElement : HTMLElement { 8 | [HTMLConstructor] constructor(); 9 | 10 | [CEReactions] attribute USVString src; 11 | [CEReactions] attribute DOMString referrerPolicy; 12 | 13 | [NewObject] Promise activate(optional PortalActivateOptions options = {}); 14 | undefined postMessage(any message, optional StructuredSerializeOptions options = {}); 15 | 16 | attribute EventHandler onmessage; 17 | attribute EventHandler onmessageerror; 18 | }; 19 | 20 | dictionary PortalActivateOptions : StructuredSerializeOptions { 21 | any data; 22 | }; 23 | 24 | partial interface Window { 25 | readonly attribute PortalHost? portalHost; 26 | }; 27 | 28 | [Exposed=Window] 29 | interface PortalHost : EventTarget { 30 | undefined postMessage(any message, optional StructuredSerializeOptions options = {}); 31 | 32 | attribute EventHandler onmessage; 33 | attribute EventHandler onmessageerror; 34 | }; 35 | 36 | [Exposed=Window] 37 | interface PortalActivateEvent : Event { 38 | constructor(DOMString type, optional PortalActivateEventInit eventInitDict = {}); 39 | 40 | readonly attribute any data; 41 | HTMLPortalElement adoptPredecessor(); 42 | }; 43 | 44 | dictionary PortalActivateEventInit : EventInit { 45 | any data = null; 46 | }; 47 | 48 | partial interface mixin WindowEventHandlers { 49 | attribute EventHandler onportalactivate; 50 | }; 51 | -------------------------------------------------------------------------------- /js_pyi/w3c_webref/ed/idl/prefer-current-tab.idl: -------------------------------------------------------------------------------- 1 | // GENERATED CONTENT - DO NOT EDIT 2 | // Content was automatically extracted by Reffy into webref 3 | // (https://github.com/w3c/webref) 4 | // Source: preferCurrentTab (https://wicg.github.io/prefer-current-tab/) 5 | 6 | partial dictionary MediaStreamConstraints { 7 | boolean preferCurrentTab = false; 8 | }; 9 | -------------------------------------------------------------------------------- /js_pyi/w3c_webref/ed/idl/prerendering-revamped.idl: -------------------------------------------------------------------------------- 1 | // GENERATED CONTENT - DO NOT EDIT 2 | // Content was automatically extracted by Reffy into webref 3 | // (https://github.com/w3c/webref) 4 | // Source: Prerendering Revamped (https://wicg.github.io/nav-speculation/prerendering.html) 5 | 6 | partial interface Document { 7 | readonly attribute boolean prerendering; 8 | 9 | // Under "special event handler IDL attributes that only apply to Document objects" 10 | attribute EventHandler onprerenderingchange; 11 | }; 12 | 13 | partial interface PerformanceNavigationTiming { 14 | readonly attribute DOMHighResTimeStamp activationStart; 15 | }; 16 | -------------------------------------------------------------------------------- /js_pyi/w3c_webref/ed/idl/priority-hints.idl: -------------------------------------------------------------------------------- 1 | // GENERATED CONTENT - DO NOT EDIT 2 | // Content was automatically extracted by Reffy into webref 3 | // (https://github.com/w3c/webref) 4 | // Source: Priority Hints (https://wicg.github.io/priority-hints/) 5 | 6 | partial interface HTMLImageElement { 7 | [CEReactions] attribute DOMString fetchPriority; 8 | }; 9 | 10 | partial interface HTMLLinkElement { 11 | [CEReactions] attribute DOMString fetchPriority; 12 | }; 13 | 14 | partial interface HTMLScriptElement { 15 | [CEReactions] attribute DOMString fetchPriority; 16 | }; 17 | 18 | partial interface HTMLIFrameElement { 19 | [CEReactions] attribute DOMString fetchPriority; 20 | }; 21 | -------------------------------------------------------------------------------- /js_pyi/w3c_webref/ed/idl/private-click-measurement.idl: -------------------------------------------------------------------------------- 1 | // GENERATED CONTENT - DO NOT EDIT 2 | // Content was automatically extracted by Reffy into webref 3 | // (https://github.com/w3c/webref) 4 | // Source: Private Click Measurement (https://privacycg.github.io/private-click-measurement/) 5 | 6 | partial interface HTMLAnchorElement { 7 | [CEReactions] attribute unsigned long attributionSourceId; 8 | }; 9 | -------------------------------------------------------------------------------- /js_pyi/w3c_webref/ed/idl/proximity.idl: -------------------------------------------------------------------------------- 1 | // GENERATED CONTENT - DO NOT EDIT 2 | // Content was automatically extracted by Reffy into webref 3 | // (https://github.com/w3c/webref) 4 | // Source: Proximity Sensor (https://w3c.github.io/proximity/) 5 | 6 | [SecureContext, Exposed=Window] 7 | interface ProximitySensor : Sensor { 8 | constructor(optional SensorOptions sensorOptions = {}); 9 | readonly attribute double? distance; 10 | readonly attribute double? max; 11 | readonly attribute boolean? near; 12 | }; 13 | 14 | dictionary ProximityReadingValues { 15 | required double? distance; 16 | required double? max; 17 | required boolean? near; 18 | }; 19 | -------------------------------------------------------------------------------- /js_pyi/w3c_webref/ed/idl/raw-camera-access.idl: -------------------------------------------------------------------------------- 1 | // GENERATED CONTENT - DO NOT EDIT 2 | // Content was automatically extracted by Reffy into webref 3 | // (https://github.com/w3c/webref) 4 | // Source: WebXR Raw Camera Access Module (https://immersive-web.github.io/raw-camera-access/) 5 | 6 | partial interface XRView { 7 | [SameObject] readonly attribute XRCamera? camera; 8 | }; 9 | 10 | [SecureContext, Exposed=Window] 11 | interface XRCamera { 12 | readonly attribute unsigned long width; 13 | readonly attribute unsigned long height; 14 | }; 15 | 16 | partial interface XRWebGLBinding { 17 | WebGLTexture? getCameraImage(XRCamera camera); 18 | }; 19 | -------------------------------------------------------------------------------- /js_pyi/w3c_webref/ed/idl/referrer-policy.idl: -------------------------------------------------------------------------------- 1 | // GENERATED CONTENT - DO NOT EDIT 2 | // Content was automatically extracted by Reffy into webref 3 | // (https://github.com/w3c/webref) 4 | // Source: Referrer Policy (https://w3c.github.io/webappsec-referrer-policy/) 5 | 6 | enum ReferrerPolicy { 7 | "", 8 | "no-referrer", 9 | "no-referrer-when-downgrade", 10 | "same-origin", 11 | "origin", 12 | "strict-origin", 13 | "origin-when-cross-origin", 14 | "strict-origin-when-cross-origin", 15 | "unsafe-url" 16 | }; 17 | -------------------------------------------------------------------------------- /js_pyi/w3c_webref/ed/idl/remote-playback.idl: -------------------------------------------------------------------------------- 1 | // GENERATED CONTENT - DO NOT EDIT 2 | // Content was automatically extracted by Reffy into webref 3 | // (https://github.com/w3c/webref) 4 | // Source: Remote Playback API (https://w3c.github.io/remote-playback/) 5 | 6 | [Exposed=Window] 7 | interface RemotePlayback : EventTarget { 8 | Promise watchAvailability(RemotePlaybackAvailabilityCallback callback); 9 | Promise cancelWatchAvailability(optional long id); 10 | 11 | readonly attribute RemotePlaybackState state; 12 | 13 | attribute EventHandler onconnecting; 14 | attribute EventHandler onconnect; 15 | attribute EventHandler ondisconnect; 16 | 17 | Promise prompt(); 18 | }; 19 | 20 | enum RemotePlaybackState { 21 | "connecting", 22 | "connected", 23 | "disconnected" 24 | }; 25 | 26 | callback RemotePlaybackAvailabilityCallback = undefined(boolean available); 27 | 28 | partial interface HTMLMediaElement { 29 | [SameObject] readonly attribute RemotePlayback remote; 30 | 31 | [CEReactions] attribute boolean disableRemotePlayback; 32 | }; 33 | -------------------------------------------------------------------------------- /js_pyi/w3c_webref/ed/idl/reporting.idl: -------------------------------------------------------------------------------- 1 | // GENERATED CONTENT - DO NOT EDIT 2 | // Content was automatically extracted by Reffy into webref 3 | // (https://github.com/w3c/webref) 4 | // Source: Reporting API (https://w3c.github.io/reporting/) 5 | 6 | [Exposed=(Window,Worker)] 7 | interface ReportBody { 8 | [Default] object toJSON(); 9 | }; 10 | 11 | [Exposed=(Window,Worker)] 12 | interface Report { 13 | [Default] object toJSON(); 14 | readonly attribute DOMString type; 15 | readonly attribute DOMString url; 16 | readonly attribute ReportBody? body; 17 | }; 18 | 19 | [Exposed=(Window,Worker)] 20 | interface ReportingObserver { 21 | constructor(ReportingObserverCallback callback, optional ReportingObserverOptions options = {}); 22 | undefined observe(); 23 | undefined disconnect(); 24 | ReportList takeRecords(); 25 | }; 26 | 27 | callback ReportingObserverCallback = undefined (sequence reports, ReportingObserver observer); 28 | 29 | dictionary ReportingObserverOptions { 30 | sequence types; 31 | boolean buffered = false; 32 | }; 33 | 34 | typedef sequence ReportList; 35 | 36 | dictionary GenerateTestReportParameters { 37 | required DOMString message; 38 | DOMString group = "default"; 39 | }; 40 | -------------------------------------------------------------------------------- /js_pyi/w3c_webref/ed/idl/requestidlecallback.idl: -------------------------------------------------------------------------------- 1 | // GENERATED CONTENT - DO NOT EDIT 2 | // Content was automatically extracted by Reffy into webref 3 | // (https://github.com/w3c/webref) 4 | // Source: requestIdleCallback() (https://w3c.github.io/requestidlecallback/) 5 | 6 | partial interface Window { 7 | unsigned long requestIdleCallback(IdleRequestCallback callback, optional IdleRequestOptions options = {}); 8 | undefined cancelIdleCallback(unsigned long handle); 9 | }; 10 | 11 | dictionary IdleRequestOptions { 12 | unsigned long timeout; 13 | }; 14 | 15 | [Exposed=Window] interface IdleDeadline { 16 | DOMHighResTimeStamp timeRemaining(); 17 | readonly attribute boolean didTimeout; 18 | }; 19 | 20 | callback IdleRequestCallback = undefined (IdleDeadline deadline); 21 | -------------------------------------------------------------------------------- /js_pyi/w3c_webref/ed/idl/resize-observer.idl: -------------------------------------------------------------------------------- 1 | // GENERATED CONTENT - DO NOT EDIT 2 | // Content was automatically extracted by Reffy into webref 3 | // (https://github.com/w3c/webref) 4 | // Source: Resize Observer (https://drafts.csswg.org/resize-observer-1/) 5 | 6 | enum ResizeObserverBoxOptions { 7 | "border-box", "content-box", "device-pixel-content-box" 8 | }; 9 | 10 | dictionary ResizeObserverOptions { 11 | ResizeObserverBoxOptions box = "content-box"; 12 | }; 13 | 14 | [Exposed=(Window)] 15 | interface ResizeObserver { 16 | constructor(ResizeObserverCallback callback); 17 | undefined observe(Element target, optional ResizeObserverOptions options = {}); 18 | undefined unobserve(Element target); 19 | undefined disconnect(); 20 | }; 21 | 22 | callback ResizeObserverCallback = undefined (sequence entries, ResizeObserver observer); 23 | 24 | [Exposed=Window] 25 | interface ResizeObserverEntry { 26 | readonly attribute Element target; 27 | readonly attribute DOMRectReadOnly contentRect; 28 | readonly attribute FrozenArray borderBoxSize; 29 | readonly attribute FrozenArray contentBoxSize; 30 | readonly attribute FrozenArray devicePixelContentBoxSize; 31 | }; 32 | 33 | [Exposed=Window] 34 | interface ResizeObserverSize { 35 | readonly attribute unrestricted double inlineSize; 36 | readonly attribute unrestricted double blockSize; 37 | }; 38 | -------------------------------------------------------------------------------- /js_pyi/w3c_webref/ed/idl/resource-timing.idl: -------------------------------------------------------------------------------- 1 | // GENERATED CONTENT - DO NOT EDIT 2 | // Content was automatically extracted by Reffy into webref 3 | // (https://github.com/w3c/webref) 4 | // Source: Resource Timing (https://w3c.github.io/resource-timing/) 5 | 6 | [Exposed=(Window,Worker)] 7 | interface PerformanceResourceTiming : PerformanceEntry { 8 | readonly attribute DOMString initiatorType; 9 | readonly attribute ByteString nextHopProtocol; 10 | readonly attribute DOMHighResTimeStamp workerStart; 11 | readonly attribute DOMHighResTimeStamp redirectStart; 12 | readonly attribute DOMHighResTimeStamp redirectEnd; 13 | readonly attribute DOMHighResTimeStamp fetchStart; 14 | readonly attribute DOMHighResTimeStamp domainLookupStart; 15 | readonly attribute DOMHighResTimeStamp domainLookupEnd; 16 | readonly attribute DOMHighResTimeStamp connectStart; 17 | readonly attribute DOMHighResTimeStamp connectEnd; 18 | readonly attribute DOMHighResTimeStamp secureConnectionStart; 19 | readonly attribute DOMHighResTimeStamp requestStart; 20 | readonly attribute DOMHighResTimeStamp responseStart; 21 | readonly attribute DOMHighResTimeStamp responseEnd; 22 | readonly attribute unsigned long long transferSize; 23 | readonly attribute unsigned long long encodedBodySize; 24 | readonly attribute unsigned long long decodedBodySize; 25 | readonly attribute unsigned short responseStatus; 26 | readonly attribute RenderBlockingStatusType renderBlockingStatus; 27 | [Default] object toJSON(); 28 | }; 29 | 30 | enum RenderBlockingStatusType { 31 | "blocking", 32 | "non-blocking" 33 | }; 34 | 35 | partial interface Performance { 36 | undefined clearResourceTimings (); 37 | undefined setResourceTimingBufferSize (unsigned long maxSize); 38 | attribute EventHandler onresourcetimingbufferfull; 39 | }; 40 | -------------------------------------------------------------------------------- /js_pyi/w3c_webref/ed/idl/sanitizer-api.idl: -------------------------------------------------------------------------------- 1 | // GENERATED CONTENT - DO NOT EDIT 2 | // Content was automatically extracted by Reffy into webref 3 | // (https://github.com/w3c/webref) 4 | // Source: HTML Sanitizer API (https://wicg.github.io/sanitizer-api/) 5 | 6 | [ 7 | Exposed=(Window), 8 | SecureContext 9 | ] interface Sanitizer { 10 | constructor(optional SanitizerConfig config = {}); 11 | 12 | DocumentFragment sanitize((Document or DocumentFragment) input); 13 | Element? sanitizeFor(DOMString element, DOMString input); 14 | 15 | SanitizerConfig getConfiguration(); 16 | static SanitizerConfig getDefaultConfiguration(); 17 | }; 18 | 19 | dictionary SetHTMLOptions { 20 | Sanitizer sanitizer; 21 | }; 22 | [SecureContext] 23 | partial interface Element { 24 | undefined setHTML(DOMString input, optional SetHTMLOptions options = {}); 25 | }; 26 | 27 | dictionary SanitizerConfig { 28 | sequence allowElements; 29 | sequence blockElements; 30 | sequence dropElements; 31 | AttributeMatchList allowAttributes; 32 | AttributeMatchList dropAttributes; 33 | boolean allowCustomElements; 34 | boolean allowUnknownMarkup; 35 | boolean allowComments; 36 | }; 37 | 38 | typedef record> AttributeMatchList; 39 | -------------------------------------------------------------------------------- /js_pyi/w3c_webref/ed/idl/savedata.idl: -------------------------------------------------------------------------------- 1 | // GENERATED CONTENT - DO NOT EDIT 2 | // Content was automatically extracted by Reffy into webref 3 | // (https://github.com/w3c/webref) 4 | // Source: Save Data API (https://wicg.github.io/savedata/) 5 | 6 | interface mixin NetworkInformationSaveData { 7 | [SameObject] readonly attribute boolean saveData; 8 | }; 9 | 10 | NetworkInformation includes NetworkInformationSaveData; 11 | -------------------------------------------------------------------------------- /js_pyi/w3c_webref/ed/idl/scheduling-apis.idl: -------------------------------------------------------------------------------- 1 | // GENERATED CONTENT - DO NOT EDIT 2 | // Content was automatically extracted by Reffy into webref 3 | // (https://github.com/w3c/webref) 4 | // Source: Prioritized Task Scheduling (https://wicg.github.io/scheduling-apis/) 5 | 6 | enum TaskPriority { 7 | "user-blocking", 8 | "user-visible", 9 | "background" 10 | }; 11 | 12 | dictionary SchedulerPostTaskOptions { 13 | AbortSignal signal; 14 | TaskPriority priority; 15 | [EnforceRange] unsigned long long delay = 0; 16 | }; 17 | 18 | callback SchedulerPostTaskCallback = any (); 19 | 20 | [Exposed=(Window, Worker)] 21 | interface Scheduler { 22 | Promise postTask(SchedulerPostTaskCallback callback, 23 | optional SchedulerPostTaskOptions options = {}); 24 | }; 25 | 26 | [Exposed=(Window, Worker)] 27 | interface TaskPriorityChangeEvent : Event { 28 | constructor(DOMString type, TaskPriorityChangeEventInit priorityChangeEventInitDict); 29 | 30 | readonly attribute TaskPriority previousPriority; 31 | }; 32 | 33 | dictionary TaskPriorityChangeEventInit : EventInit { 34 | required TaskPriority previousPriority; 35 | }; 36 | 37 | dictionary TaskControllerInit { 38 | TaskPriority priority = "user-visible"; 39 | }; 40 | 41 | [Exposed=(Window,Worker)] 42 | interface TaskController : AbortController { 43 | constructor(optional TaskControllerInit init = {}); 44 | 45 | undefined setPriority(TaskPriority priority); 46 | }; 47 | 48 | [Exposed=(Window, Worker)] 49 | interface TaskSignal : AbortSignal { 50 | readonly attribute TaskPriority priority; 51 | 52 | attribute EventHandler onprioritychange; 53 | }; 54 | 55 | partial interface mixin WindowOrWorkerGlobalScope { 56 | [Replaceable] readonly attribute Scheduler scheduler; 57 | }; 58 | -------------------------------------------------------------------------------- /js_pyi/w3c_webref/ed/idl/screen-orientation.idl: -------------------------------------------------------------------------------- 1 | // GENERATED CONTENT - DO NOT EDIT 2 | // Content was automatically extracted by Reffy into webref 3 | // (https://github.com/w3c/webref) 4 | // Source: Screen Orientation (https://w3c.github.io/screen-orientation/) 5 | 6 | partial interface Screen { 7 | [SameObject] readonly attribute ScreenOrientation orientation; 8 | }; 9 | 10 | [Exposed=Window] 11 | interface ScreenOrientation : EventTarget { 12 | Promise lock(OrientationLockType orientation); 13 | undefined unlock(); 14 | readonly attribute OrientationType type; 15 | readonly attribute unsigned short angle; 16 | attribute EventHandler onchange; 17 | }; 18 | 19 | enum OrientationLockType { 20 | "any", 21 | "natural", 22 | "landscape", 23 | "portrait", 24 | "portrait-primary", 25 | "portrait-secondary", 26 | "landscape-primary", 27 | "landscape-secondary" 28 | }; 29 | 30 | enum OrientationType { 31 | "portrait-primary", 32 | "portrait-secondary", 33 | "landscape-primary", 34 | "landscape-secondary" 35 | }; 36 | -------------------------------------------------------------------------------- /js_pyi/w3c_webref/ed/idl/screen-wake-lock.idl: -------------------------------------------------------------------------------- 1 | // GENERATED CONTENT - DO NOT EDIT 2 | // Content was automatically extracted by Reffy into webref 3 | // (https://github.com/w3c/webref) 4 | // Source: Screen Wake Lock API (https://w3c.github.io/screen-wake-lock/) 5 | 6 | [SecureContext] 7 | partial interface Navigator { 8 | [SameObject] readonly attribute WakeLock wakeLock; 9 | }; 10 | 11 | [SecureContext, Exposed=(Window)] 12 | interface WakeLock { 13 | Promise request(optional WakeLockType type = "screen"); 14 | }; 15 | 16 | [SecureContext, Exposed=(Window)] 17 | interface WakeLockSentinel : EventTarget { 18 | readonly attribute boolean released; 19 | readonly attribute WakeLockType type; 20 | Promise release(); 21 | attribute EventHandler onrelease; 22 | }; 23 | 24 | enum WakeLockType { "screen" }; 25 | -------------------------------------------------------------------------------- /js_pyi/w3c_webref/ed/idl/scroll-animations.idl: -------------------------------------------------------------------------------- 1 | // GENERATED CONTENT - DO NOT EDIT 2 | // Content was automatically extracted by Reffy into webref 3 | // (https://github.com/w3c/webref) 4 | // Source: Scroll-driven Animations (https://drafts.csswg.org/scroll-animations-1/) 5 | 6 | enum ScrollAxis { 7 | "block", 8 | "inline", 9 | "horizontal", 10 | "vertical" 11 | }; 12 | 13 | dictionary ScrollTimelineOptions { 14 | Element? source; 15 | ScrollAxis axis = "block"; 16 | }; 17 | 18 | [Exposed=Window] 19 | interface ScrollTimeline : AnimationTimeline { 20 | constructor(optional ScrollTimelineOptions options = {}); 21 | readonly attribute Element? source; 22 | readonly attribute ScrollAxis axis; 23 | }; 24 | 25 | dictionary ViewTimelineOptions { 26 | Element subject; 27 | ScrollAxis axis = "block"; 28 | }; 29 | 30 | [Exposed=Window] 31 | interface ViewTimeline : ScrollTimeline { 32 | constructor(optional ViewTimelineOptions options = {}); 33 | readonly attribute Element subject; 34 | readonly attribute CSSNumericValue startOffset; 35 | readonly attribute CSSNumericValue endOffset; 36 | }; 37 | 38 | [Exposed=Window] 39 | partial interface AnimationTimeline { 40 | CSSNumericValue? getCurrentTime(optional CSSOMString rangeName); 41 | }; 42 | -------------------------------------------------------------------------------- /js_pyi/w3c_webref/ed/idl/scroll-to-text-fragment.idl: -------------------------------------------------------------------------------- 1 | // GENERATED CONTENT - DO NOT EDIT 2 | // Content was automatically extracted by Reffy into webref 3 | // (https://github.com/w3c/webref) 4 | // Source: Text Fragments (https://wicg.github.io/scroll-to-text-fragment/) 5 | 6 | [Exposed=Window] 7 | interface FragmentDirective { 8 | }; 9 | 10 | partial interface Document { 11 | [SameObject] readonly attribute FragmentDirective fragmentDirective; 12 | }; 13 | -------------------------------------------------------------------------------- /js_pyi/w3c_webref/ed/idl/secure-payment-confirmation.idl: -------------------------------------------------------------------------------- 1 | // GENERATED CONTENT - DO NOT EDIT 2 | // Content was automatically extracted by Reffy into webref 3 | // (https://github.com/w3c/webref) 4 | // Source: Secure Payment Confirmation (https://w3c.github.io/secure-payment-confirmation/) 5 | 6 | dictionary SecurePaymentConfirmationRequest { 7 | required BufferSource challenge; 8 | required USVString rpId; 9 | required sequence credentialIds; 10 | required PaymentCredentialInstrument instrument; 11 | unsigned long timeout; 12 | USVString payeeName; 13 | USVString payeeOrigin; 14 | AuthenticationExtensionsClientInputs extensions; 15 | sequence locale; 16 | boolean showOptOut; 17 | }; 18 | 19 | partial dictionary AuthenticationExtensionsClientInputs { 20 | AuthenticationExtensionsPaymentInputs payment; 21 | }; 22 | 23 | dictionary AuthenticationExtensionsPaymentInputs { 24 | boolean isPayment; 25 | 26 | // Only used for authentication. 27 | USVString rpId; 28 | USVString topOrigin; 29 | USVString payeeName; 30 | USVString payeeOrigin; 31 | PaymentCurrencyAmount total; 32 | PaymentCredentialInstrument instrument; 33 | }; 34 | 35 | dictionary CollectedClientPaymentData : CollectedClientData { 36 | required CollectedClientAdditionalPaymentData payment; 37 | }; 38 | 39 | dictionary CollectedClientAdditionalPaymentData { 40 | required USVString rpId; 41 | required USVString topOrigin; 42 | USVString payeeName; 43 | USVString payeeOrigin; 44 | required PaymentCurrencyAmount total; 45 | required PaymentCredentialInstrument instrument; 46 | }; 47 | 48 | dictionary PaymentCredentialInstrument { 49 | required USVString displayName; 50 | required USVString icon; 51 | boolean iconMustBeShown = true; 52 | }; 53 | 54 | enum TransactionAutomationMode { 55 | "none", 56 | "autoAccept", 57 | "autoReject", 58 | "autoOptOut" 59 | }; 60 | -------------------------------------------------------------------------------- /js_pyi/w3c_webref/ed/idl/selection-api.idl: -------------------------------------------------------------------------------- 1 | // GENERATED CONTENT - DO NOT EDIT 2 | // Content was automatically extracted by Reffy into webref 3 | // (https://github.com/w3c/webref) 4 | // Source: Selection API (https://w3c.github.io/selection-api/) 5 | 6 | [Exposed=Window] 7 | interface Selection { 8 | readonly attribute Node? anchorNode; 9 | readonly attribute unsigned long anchorOffset; 10 | readonly attribute Node? focusNode; 11 | readonly attribute unsigned long focusOffset; 12 | readonly attribute boolean isCollapsed; 13 | readonly attribute unsigned long rangeCount; 14 | readonly attribute DOMString type; 15 | Range getRangeAt(unsigned long index); 16 | undefined addRange(Range range); 17 | undefined removeRange(Range range); 18 | undefined removeAllRanges(); 19 | undefined empty(); 20 | StaticRange getComposedRange(ShadowRoot... shadowRoots); 21 | undefined collapse(Node? node, optional unsigned long offset = 0); 22 | undefined setPosition(Node? node, optional unsigned long offset = 0); 23 | undefined collapseToStart(); 24 | undefined collapseToEnd(); 25 | undefined extend(Node node, optional unsigned long offset = 0); 26 | undefined setBaseAndExtent(Node anchorNode, unsigned long anchorOffset, Node focusNode, unsigned long focusOffset); 27 | undefined selectAllChildren(Node node); 28 | undefined modify(optional DOMString alter, optional DOMString direction, optional DOMString granularity); 29 | [CEReactions] undefined deleteFromDocument(); 30 | boolean containsNode(Node node, optional boolean allowPartialContainment = false); 31 | stringifier; 32 | }; 33 | 34 | partial interface Document { 35 | Selection? getSelection(); 36 | }; 37 | 38 | partial interface Window { 39 | Selection? getSelection(); 40 | }; 41 | 42 | partial interface mixin GlobalEventHandlers { 43 | attribute EventHandler onselectstart; 44 | attribute EventHandler onselectionchange; 45 | }; 46 | -------------------------------------------------------------------------------- /js_pyi/w3c_webref/ed/idl/server-timing.idl: -------------------------------------------------------------------------------- 1 | // GENERATED CONTENT - DO NOT EDIT 2 | // Content was automatically extracted by Reffy into webref 3 | // (https://github.com/w3c/webref) 4 | // Source: Server Timing (https://w3c.github.io/server-timing/) 5 | 6 | [Exposed=(Window,Worker)] 7 | interface PerformanceServerTiming { 8 | readonly attribute DOMString name; 9 | readonly attribute DOMHighResTimeStamp duration; 10 | readonly attribute DOMString description; 11 | [Default] object toJSON(); 12 | }; 13 | 14 | [Exposed=(Window,Worker)] 15 | partial interface PerformanceResourceTiming { 16 | readonly attribute FrozenArray serverTiming; 17 | }; 18 | -------------------------------------------------------------------------------- /js_pyi/w3c_webref/ed/idl/shape-detection-api.idl: -------------------------------------------------------------------------------- 1 | // GENERATED CONTENT - DO NOT EDIT 2 | // Content was automatically extracted by Reffy into webref 3 | // (https://github.com/w3c/webref) 4 | // Source: Accelerated Shape Detection in Images (https://wicg.github.io/shape-detection-api/) 5 | 6 | [Exposed=(Window,Worker), 7 | SecureContext] 8 | interface FaceDetector { 9 | constructor(optional FaceDetectorOptions faceDetectorOptions = {}); 10 | Promise> detect(ImageBitmapSource image); 11 | }; 12 | 13 | dictionary FaceDetectorOptions { 14 | unsigned short maxDetectedFaces; 15 | boolean fastMode; 16 | }; 17 | 18 | dictionary DetectedFace { 19 | required DOMRectReadOnly boundingBox; 20 | required FrozenArray? landmarks; 21 | }; 22 | 23 | dictionary Landmark { 24 | required FrozenArray locations; 25 | LandmarkType type; 26 | }; 27 | 28 | enum LandmarkType { 29 | "mouth", 30 | "eye", 31 | "nose" 32 | }; 33 | 34 | [Exposed=(Window,Worker), 35 | SecureContext] 36 | interface BarcodeDetector { 37 | constructor(optional BarcodeDetectorOptions barcodeDetectorOptions = {}); 38 | static Promise> getSupportedFormats(); 39 | 40 | Promise> detect(ImageBitmapSource image); 41 | }; 42 | 43 | dictionary BarcodeDetectorOptions { 44 | sequence formats; 45 | }; 46 | 47 | dictionary DetectedBarcode { 48 | required DOMRectReadOnly boundingBox; 49 | required DOMString rawValue; 50 | required BarcodeFormat format; 51 | required FrozenArray cornerPoints; 52 | }; 53 | 54 | enum BarcodeFormat { 55 | "aztec", 56 | "code_128", 57 | "code_39", 58 | "code_93", 59 | "codabar", 60 | "data_matrix", 61 | "ean_13", 62 | "ean_8", 63 | "itf", 64 | "pdf417", 65 | "qr_code", 66 | "unknown", 67 | "upc_a", 68 | "upc_e" 69 | }; 70 | -------------------------------------------------------------------------------- /js_pyi/w3c_webref/ed/idl/storage-access.idl: -------------------------------------------------------------------------------- 1 | // GENERATED CONTENT - DO NOT EDIT 2 | // Content was automatically extracted by Reffy into webref 3 | // (https://github.com/w3c/webref) 4 | // Source: The Storage Access API (https://privacycg.github.io/storage-access/) 5 | 6 | partial interface Document { 7 | Promise hasStorageAccess(); 8 | Promise requestStorageAccess(); 9 | }; 10 | -------------------------------------------------------------------------------- /js_pyi/w3c_webref/ed/idl/storage.idl: -------------------------------------------------------------------------------- 1 | // GENERATED CONTENT - DO NOT EDIT 2 | // Content was automatically extracted by Reffy into webref 3 | // (https://github.com/w3c/webref) 4 | // Source: Storage Standard (https://storage.spec.whatwg.org/) 5 | 6 | [SecureContext] 7 | interface mixin NavigatorStorage { 8 | [SameObject] readonly attribute StorageManager storage; 9 | }; 10 | Navigator includes NavigatorStorage; 11 | WorkerNavigator includes NavigatorStorage; 12 | 13 | [SecureContext, 14 | Exposed=(Window,Worker)] 15 | interface StorageManager { 16 | Promise persisted(); 17 | [Exposed=Window] Promise persist(); 18 | 19 | Promise estimate(); 20 | }; 21 | 22 | dictionary StorageEstimate { 23 | unsigned long long usage; 24 | unsigned long long quota; 25 | }; 26 | -------------------------------------------------------------------------------- /js_pyi/w3c_webref/ed/idl/svg-animations.idl: -------------------------------------------------------------------------------- 1 | // GENERATED CONTENT - DO NOT EDIT 2 | // Content was automatically extracted by Reffy into webref 3 | // (https://github.com/w3c/webref) 4 | // Source: SVG Animations (https://svgwg.org/specs/animations/) 5 | 6 | [Exposed=Window] 7 | interface TimeEvent : Event { 8 | 9 | readonly attribute WindowProxy? view; 10 | readonly attribute long detail; 11 | 12 | undefined initTimeEvent(DOMString typeArg, Window? viewArg, long detailArg); 13 | }; 14 | 15 | [Exposed=Window] 16 | interface SVGAnimationElement : SVGElement { 17 | 18 | readonly attribute SVGElement? targetElement; 19 | 20 | attribute EventHandler onbegin; 21 | attribute EventHandler onend; 22 | attribute EventHandler onrepeat; 23 | 24 | float getStartTime(); 25 | float getCurrentTime(); 26 | float getSimpleDuration(); 27 | 28 | undefined beginElement(); 29 | undefined beginElementAt(float offset); 30 | undefined endElement(); 31 | undefined endElementAt(float offset); 32 | }; 33 | 34 | SVGAnimationElement includes SVGTests; 35 | 36 | [Exposed=Window] 37 | interface SVGAnimateElement : SVGAnimationElement { 38 | }; 39 | 40 | [Exposed=Window] 41 | interface SVGSetElement : SVGAnimationElement { 42 | }; 43 | 44 | [Exposed=Window] 45 | interface SVGAnimateMotionElement : SVGAnimationElement { 46 | }; 47 | 48 | [Exposed=Window] 49 | interface SVGMPathElement : SVGElement { 50 | }; 51 | 52 | SVGMPathElement includes SVGURIReference; 53 | 54 | [Exposed=Window] 55 | interface SVGAnimateTransformElement : SVGAnimationElement { 56 | }; 57 | 58 | [Exposed=Window] 59 | interface SVGDiscardElement : SVGAnimationElement { 60 | }; 61 | 62 | partial interface SVGSVGElement { 63 | undefined pauseAnimations(); 64 | undefined unpauseAnimations(); 65 | boolean animationsPaused(); 66 | float getCurrentTime(); 67 | undefined setCurrentTime(float seconds); 68 | }; 69 | -------------------------------------------------------------------------------- /js_pyi/w3c_webref/ed/idl/testutils.idl: -------------------------------------------------------------------------------- 1 | // GENERATED CONTENT - DO NOT EDIT 2 | // Content was automatically extracted by Reffy into webref 3 | // (https://github.com/w3c/webref) 4 | // Source: Test Utils Standard (https://testutils.spec.whatwg.org/) 5 | 6 | [Exposed=(Window,Worker)] 7 | namespace TestUtils { 8 | [NewObject] Promise gc(); 9 | }; 10 | -------------------------------------------------------------------------------- /js_pyi/w3c_webref/ed/idl/text-detection-api.idl: -------------------------------------------------------------------------------- 1 | // GENERATED CONTENT - DO NOT EDIT 2 | // Content was automatically extracted by Reffy into webref 3 | // (https://github.com/w3c/webref) 4 | // Source: Accelerated Text Detection in Images (https://wicg.github.io/shape-detection-api/text.html) 5 | 6 | [ 7 | Exposed=(Window,Worker), 8 | SecureContext 9 | ] interface TextDetector { 10 | constructor(); 11 | Promise> detect(ImageBitmapSource image); 12 | }; 13 | 14 | dictionary DetectedText { 15 | required DOMRectReadOnly boundingBox; 16 | required DOMString rawValue; 17 | required FrozenArray cornerPoints; 18 | }; 19 | -------------------------------------------------------------------------------- /js_pyi/w3c_webref/ed/idl/ua-client-hints.idl: -------------------------------------------------------------------------------- 1 | // GENERATED CONTENT - DO NOT EDIT 2 | // Content was automatically extracted by Reffy into webref 3 | // (https://github.com/w3c/webref) 4 | // Source: User-Agent Client Hints (https://wicg.github.io/ua-client-hints/) 5 | 6 | dictionary NavigatorUABrandVersion { 7 | DOMString brand; 8 | DOMString version; 9 | }; 10 | 11 | dictionary UADataValues { 12 | sequence brands; 13 | boolean mobile; 14 | DOMString architecture; 15 | DOMString bitness; 16 | DOMString model; 17 | DOMString platform; 18 | DOMString platformVersion; 19 | DOMString uaFullVersion; // deprecated in favor of fullVersionList 20 | boolean wow64; 21 | sequence fullVersionList; 22 | }; 23 | 24 | dictionary UALowEntropyJSON { 25 | sequence brands; 26 | boolean mobile; 27 | DOMString platform; 28 | }; 29 | 30 | [Exposed=(Window,Worker)] 31 | interface NavigatorUAData { 32 | readonly attribute FrozenArray brands; 33 | readonly attribute boolean mobile; 34 | readonly attribute DOMString platform; 35 | Promise getHighEntropyValues(sequence hints); 36 | UALowEntropyJSON toJSON(); 37 | }; 38 | 39 | interface mixin NavigatorUA { 40 | [SecureContext] readonly attribute NavigatorUAData userAgentData; 41 | }; 42 | 43 | Navigator includes NavigatorUA; 44 | WorkerNavigator includes NavigatorUA; 45 | -------------------------------------------------------------------------------- /js_pyi/w3c_webref/ed/idl/url.idl: -------------------------------------------------------------------------------- 1 | // GENERATED CONTENT - DO NOT EDIT 2 | // Content was automatically extracted by Reffy into webref 3 | // (https://github.com/w3c/webref) 4 | // Source: URL Standard (https://url.spec.whatwg.org/) 5 | 6 | [Exposed=*, 7 | LegacyWindowAlias=webkitURL] 8 | interface URL { 9 | constructor(USVString url, optional USVString base); 10 | 11 | stringifier attribute USVString href; 12 | readonly attribute USVString origin; 13 | attribute USVString protocol; 14 | attribute USVString username; 15 | attribute USVString password; 16 | attribute USVString host; 17 | attribute USVString hostname; 18 | attribute USVString port; 19 | attribute USVString pathname; 20 | attribute USVString search; 21 | [SameObject] readonly attribute URLSearchParams searchParams; 22 | attribute USVString hash; 23 | 24 | USVString toJSON(); 25 | }; 26 | 27 | [Exposed=*] 28 | interface URLSearchParams { 29 | constructor(optional (sequence> or record or USVString) init = ""); 30 | 31 | undefined append(USVString name, USVString value); 32 | undefined delete(USVString name); 33 | USVString? get(USVString name); 34 | sequence getAll(USVString name); 35 | boolean has(USVString name); 36 | undefined set(USVString name, USVString value); 37 | 38 | undefined sort(); 39 | 40 | iterable; 41 | stringifier; 42 | }; 43 | -------------------------------------------------------------------------------- /js_pyi/w3c_webref/ed/idl/user-timing.idl: -------------------------------------------------------------------------------- 1 | // GENERATED CONTENT - DO NOT EDIT 2 | // Content was automatically extracted by Reffy into webref 3 | // (https://github.com/w3c/webref) 4 | // Source: User Timing Level 3 (https://w3c.github.io/user-timing/) 5 | 6 | dictionary PerformanceMarkOptions { 7 | any detail; 8 | DOMHighResTimeStamp startTime; 9 | }; 10 | 11 | dictionary PerformanceMeasureOptions { 12 | any detail; 13 | (DOMString or DOMHighResTimeStamp) start; 14 | DOMHighResTimeStamp duration; 15 | (DOMString or DOMHighResTimeStamp) end; 16 | }; 17 | 18 | partial interface Performance { 19 | PerformanceMark mark(DOMString markName, optional PerformanceMarkOptions markOptions = {}); 20 | undefined clearMarks(optional DOMString markName); 21 | PerformanceMeasure measure(DOMString measureName, optional (DOMString or PerformanceMeasureOptions) startOrMeasureOptions = {}, optional DOMString endMark); 22 | undefined clearMeasures(optional DOMString measureName); 23 | }; 24 | 25 | [Exposed=(Window,Worker)] 26 | interface PerformanceMark : PerformanceEntry { 27 | constructor(DOMString markName, optional PerformanceMarkOptions markOptions = {}); 28 | readonly attribute any detail; 29 | }; 30 | 31 | [Exposed=(Window,Worker)] 32 | interface PerformanceMeasure : PerformanceEntry { 33 | readonly attribute any detail; 34 | }; 35 | -------------------------------------------------------------------------------- /js_pyi/w3c_webref/ed/idl/vibration.idl: -------------------------------------------------------------------------------- 1 | // GENERATED CONTENT - DO NOT EDIT 2 | // Content was automatically extracted by Reffy into webref 3 | // (https://github.com/w3c/webref) 4 | // Source: Vibration API (Second Edition) (https://w3c.github.io/vibration/) 5 | 6 | typedef (unsigned long or sequence) VibratePattern; 7 | 8 | partial interface Navigator { 9 | boolean vibrate (VibratePattern pattern); 10 | }; 11 | -------------------------------------------------------------------------------- /js_pyi/w3c_webref/ed/idl/video-rvfc.idl: -------------------------------------------------------------------------------- 1 | // GENERATED CONTENT - DO NOT EDIT 2 | // Content was automatically extracted by Reffy into webref 3 | // (https://github.com/w3c/webref) 4 | // Source: HTMLVideoElement.requestVideoFrameCallback() (https://wicg.github.io/video-rvfc/) 5 | 6 | dictionary VideoFrameCallbackMetadata { 7 | required DOMHighResTimeStamp presentationTime; 8 | required DOMHighResTimeStamp expectedDisplayTime; 9 | 10 | required unsigned long width; 11 | required unsigned long height; 12 | required double mediaTime; 13 | 14 | required unsigned long presentedFrames; 15 | double processingDuration; 16 | 17 | DOMHighResTimeStamp captureTime; 18 | DOMHighResTimeStamp receiveTime; 19 | unsigned long rtpTimestamp; 20 | }; 21 | 22 | callback VideoFrameRequestCallback = undefined(DOMHighResTimeStamp now, VideoFrameCallbackMetadata metadata); 23 | 24 | partial interface HTMLVideoElement { 25 | unsigned long requestVideoFrameCallback(VideoFrameRequestCallback callback); 26 | undefined cancelVideoFrameCallback(unsigned long handle); 27 | }; 28 | -------------------------------------------------------------------------------- /js_pyi/w3c_webref/ed/idl/virtual-keyboard.idl: -------------------------------------------------------------------------------- 1 | // GENERATED CONTENT - DO NOT EDIT 2 | // Content was automatically extracted by Reffy into webref 3 | // (https://github.com/w3c/webref) 4 | // Source: VirtualKeyboard API (https://w3c.github.io/virtual-keyboard/) 5 | 6 | partial interface Navigator { 7 | [SecureContext, SameObject] readonly attribute VirtualKeyboard virtualKeyboard; 8 | }; 9 | 10 | [Exposed=Window, SecureContext] 11 | interface VirtualKeyboard : EventTarget { 12 | undefined show(); 13 | undefined hide(); 14 | readonly attribute DOMRect boundingRect; 15 | attribute boolean overlaysContent; 16 | attribute EventHandler ongeometrychange; 17 | }; 18 | 19 | partial interface mixin ElementContentEditable { 20 | [CEReactions] attribute DOMString virtualKeyboardPolicy; 21 | }; 22 | -------------------------------------------------------------------------------- /js_pyi/w3c_webref/ed/idl/wasm-web-api.idl: -------------------------------------------------------------------------------- 1 | // GENERATED CONTENT - DO NOT EDIT 2 | // Content was automatically extracted by Reffy into webref 3 | // (https://github.com/w3c/webref) 4 | // Source: WebAssembly Web API (https://webassembly.github.io/spec/web-api/) 5 | 6 | [Exposed=(Window,Worker)] 7 | partial namespace WebAssembly { 8 | Promise compileStreaming(Promise source); 9 | Promise instantiateStreaming( 10 | Promise source, optional object importObject); 11 | }; 12 | -------------------------------------------------------------------------------- /js_pyi/w3c_webref/ed/idl/web-app-launch.idl: -------------------------------------------------------------------------------- 1 | // GENERATED CONTENT - DO NOT EDIT 2 | // Content was automatically extracted by Reffy into webref 3 | // (https://github.com/w3c/webref) 4 | // Source: Web App Launch Handler API (https://wicg.github.io/web-app-launch/) 5 | 6 | [Exposed=Window] interface LaunchParams { 7 | readonly attribute DOMString? targetURL; 8 | readonly attribute FrozenArray files; 9 | }; 10 | 11 | callback LaunchConsumer = any (LaunchParams params); 12 | 13 | partial interface Window { 14 | readonly attribute LaunchQueue launchQueue; 15 | }; 16 | 17 | [Exposed=Window] interface LaunchQueue { 18 | undefined setConsumer(LaunchConsumer consumer); 19 | }; 20 | -------------------------------------------------------------------------------- /js_pyi/w3c_webref/ed/idl/web-locks.idl: -------------------------------------------------------------------------------- 1 | // GENERATED CONTENT - DO NOT EDIT 2 | // Content was automatically extracted by Reffy into webref 3 | // (https://github.com/w3c/webref) 4 | // Source: Web Locks API (https://w3c.github.io/web-locks/) 5 | 6 | [SecureContext] 7 | interface mixin NavigatorLocks { 8 | readonly attribute LockManager locks; 9 | }; 10 | Navigator includes NavigatorLocks; 11 | WorkerNavigator includes NavigatorLocks; 12 | 13 | [SecureContext, Exposed=(Window,Worker)] 14 | interface LockManager { 15 | Promise request(DOMString name, 16 | LockGrantedCallback callback); 17 | Promise request(DOMString name, 18 | LockOptions options, 19 | LockGrantedCallback callback); 20 | 21 | Promise query(); 22 | }; 23 | 24 | callback LockGrantedCallback = Promise (Lock? lock); 25 | 26 | enum LockMode { "shared", "exclusive" }; 27 | 28 | dictionary LockOptions { 29 | LockMode mode = "exclusive"; 30 | boolean ifAvailable = false; 31 | boolean steal = false; 32 | AbortSignal signal; 33 | }; 34 | 35 | dictionary LockManagerSnapshot { 36 | sequence held; 37 | sequence pending; 38 | }; 39 | 40 | dictionary LockInfo { 41 | DOMString name; 42 | LockMode mode; 43 | DOMString clientId; 44 | }; 45 | 46 | [SecureContext, Exposed=(Window,Worker)] 47 | interface Lock { 48 | readonly attribute DOMString name; 49 | readonly attribute LockMode mode; 50 | }; 51 | -------------------------------------------------------------------------------- /js_pyi/w3c_webref/ed/idl/web-otp.idl: -------------------------------------------------------------------------------- 1 | // GENERATED CONTENT - DO NOT EDIT 2 | // Content was automatically extracted by Reffy into webref 3 | // (https://github.com/w3c/webref) 4 | // Source: WebOTP API (https://wicg.github.io/web-otp/) 5 | 6 | [Exposed=Window, SecureContext] 7 | interface OTPCredential : Credential { 8 | readonly attribute DOMString code; 9 | }; 10 | 11 | partial dictionary CredentialRequestOptions { 12 | OTPCredentialRequestOptions otp; 13 | }; 14 | 15 | dictionary OTPCredentialRequestOptions { 16 | sequence transport = []; 17 | }; 18 | 19 | enum OTPCredentialTransportType { 20 | "sms", 21 | }; 22 | -------------------------------------------------------------------------------- /js_pyi/w3c_webref/ed/idl/web-share.idl: -------------------------------------------------------------------------------- 1 | // GENERATED CONTENT - DO NOT EDIT 2 | // Content was automatically extracted by Reffy into webref 3 | // (https://github.com/w3c/webref) 4 | // Source: Web Share API (https://w3c.github.io/web-share/) 5 | 6 | partial interface Navigator { 7 | [SecureContext] Promise share(optional ShareData data = {}); 8 | [SecureContext] boolean canShare(optional ShareData data = {}); 9 | }; 10 | 11 | dictionary ShareData { 12 | sequence files; 13 | USVString title; 14 | USVString text; 15 | USVString url; 16 | }; 17 | -------------------------------------------------------------------------------- /js_pyi/w3c_webref/ed/idl/webcodecs-aac-codec-registration.idl: -------------------------------------------------------------------------------- 1 | // GENERATED CONTENT - DO NOT EDIT 2 | // Content was automatically extracted by Reffy into webref 3 | // (https://github.com/w3c/webref) 4 | // Source: AAC WebCodecs Registration (https://w3c.github.io/webcodecs/aac_codec_registration.html) 5 | 6 | partial dictionary AudioEncoderConfig { 7 | AacEncoderConfig aac; 8 | }; 9 | 10 | dictionary AacEncoderConfig { 11 | AacBitstreamFormat format = "aac"; 12 | }; 13 | 14 | enum AacBitstreamFormat { 15 | "aac", 16 | "adts", 17 | }; 18 | -------------------------------------------------------------------------------- /js_pyi/w3c_webref/ed/idl/webcodecs-avc-codec-registration.idl: -------------------------------------------------------------------------------- 1 | // GENERATED CONTENT - DO NOT EDIT 2 | // Content was automatically extracted by Reffy into webref 3 | // (https://github.com/w3c/webref) 4 | // Source: AVC (H.264) WebCodecs Registration (https://w3c.github.io/webcodecs/avc_codec_registration.html) 5 | 6 | partial dictionary VideoEncoderConfig { 7 | AvcEncoderConfig avc; 8 | }; 9 | 10 | dictionary AvcEncoderConfig { 11 | AvcBitstreamFormat format = "avc"; 12 | }; 13 | 14 | enum AvcBitstreamFormat { 15 | "annexb", 16 | "avc", 17 | }; 18 | -------------------------------------------------------------------------------- /js_pyi/w3c_webref/ed/idl/webcodecs-flac-codec-registration.idl: -------------------------------------------------------------------------------- 1 | // GENERATED CONTENT - DO NOT EDIT 2 | // Content was automatically extracted by Reffy into webref 3 | // (https://github.com/w3c/webref) 4 | // Source: FLAC WebCodecs Registration (https://w3c.github.io/webcodecs/flac_codec_registration.html) 5 | 6 | partial dictionary AudioEncoderConfig { 7 | FlacEncoderConfig flac; 8 | }; 9 | 10 | dictionary FlacEncoderConfig { 11 | [EnforceRange] unsigned long blockSize = 0; 12 | [EnforceRange] unsigned long compressLevel = 5; 13 | }; 14 | -------------------------------------------------------------------------------- /js_pyi/w3c_webref/ed/idl/webcodecs-hevc-codec-registration.idl: -------------------------------------------------------------------------------- 1 | // GENERATED CONTENT - DO NOT EDIT 2 | // Content was automatically extracted by Reffy into webref 3 | // (https://github.com/w3c/webref) 4 | // Source: HEVC (H.265) WebCodecs Registration (https://w3c.github.io/webcodecs/hevc_codec_registration.html) 5 | 6 | partial dictionary VideoEncoderConfig { 7 | HevcEncoderConfig hevc; 8 | }; 9 | 10 | dictionary HevcEncoderConfig { 11 | HevcBitstreamFormat format = "hevc"; 12 | }; 13 | 14 | enum HevcBitstreamFormat { 15 | "annexb", 16 | "hevc", 17 | }; 18 | -------------------------------------------------------------------------------- /js_pyi/w3c_webref/ed/idl/webcodecs-opus-codec-registration.idl: -------------------------------------------------------------------------------- 1 | // GENERATED CONTENT - DO NOT EDIT 2 | // Content was automatically extracted by Reffy into webref 3 | // (https://github.com/w3c/webref) 4 | // Source: Opus WebCodecs Registration (https://w3c.github.io/webcodecs/opus_codec_registration.html) 5 | 6 | partial dictionary AudioEncoderConfig { 7 | OpusEncoderConfig opus; 8 | }; 9 | 10 | dictionary OpusEncoderConfig { 11 | OpusBitstreamFormat format = "opus"; 12 | [EnforceRange] unsigned long long frameDuration = 20000; 13 | [EnforceRange] unsigned long complexity; 14 | [EnforceRange] unsigned long packetlossperc = 0; 15 | boolean useinbandfec = false; 16 | boolean usedtx = false; 17 | }; 18 | 19 | enum OpusBitstreamFormat { 20 | "opus", 21 | "ogg", 22 | }; 23 | -------------------------------------------------------------------------------- /js_pyi/w3c_webref/ed/idl/webcrypto-secure-curves.idl: -------------------------------------------------------------------------------- 1 | // GENERATED CONTENT - DO NOT EDIT 2 | // Content was automatically extracted by Reffy into webref 3 | // (https://github.com/w3c/webref) 4 | // Source: Secure Curves in the Web Cryptography API (https://wicg.github.io/webcrypto-secure-curves/) 5 | 6 | dictionary Ed448Params : Algorithm { 7 | BufferSource context; 8 | }; 9 | -------------------------------------------------------------------------------- /js_pyi/w3c_webref/ed/idl/webdriver.idl: -------------------------------------------------------------------------------- 1 | // GENERATED CONTENT - DO NOT EDIT 2 | // Content was automatically extracted by Reffy into webref 3 | // (https://github.com/w3c/webref) 4 | // Source: WebDriver (https://w3c.github.io/webdriver/) 5 | 6 | interface mixin NavigatorAutomationInformation { 7 | readonly attribute boolean webdriver; 8 | }; 9 | Navigator includes NavigatorAutomationInformation; 10 | -------------------------------------------------------------------------------- /js_pyi/w3c_webref/ed/idl/webrtc-ice.idl: -------------------------------------------------------------------------------- 1 | // GENERATED CONTENT - DO NOT EDIT 2 | // Content was automatically extracted by Reffy into webref 3 | // (https://github.com/w3c/webref) 4 | // Source: IceTransport Extensions for WebRTC (https://w3c.github.io/webrtc-ice/) 5 | 6 | partial dictionary RTCIceParameters { 7 | boolean iceLite; 8 | }; 9 | 10 | dictionary RTCIceGatherOptions { 11 | RTCIceTransportPolicy gatherPolicy = "all"; 12 | sequence iceServers; 13 | }; 14 | 15 | [Exposed=Window] 16 | partial interface RTCIceTransport { 17 | constructor(); 18 | undefined gather (optional RTCIceGatherOptions options = {}); 19 | undefined start (optional RTCIceParameters remoteParameters = {}, optional RTCIceRole role = "controlled"); 20 | undefined stop (); 21 | undefined addRemoteCandidate (optional RTCIceCandidateInit remoteCandidate = {}); 22 | attribute EventHandler onerror; 23 | attribute EventHandler onicecandidate; 24 | }; 25 | -------------------------------------------------------------------------------- /js_pyi/w3c_webref/ed/idl/webrtc-priority.idl: -------------------------------------------------------------------------------- 1 | // GENERATED CONTENT - DO NOT EDIT 2 | // Content was automatically extracted by Reffy into webref 3 | // (https://github.com/w3c/webref) 4 | // Source: WebRTC Priority Control API (https://w3c.github.io/webrtc-priority/) 5 | 6 | enum RTCPriorityType { 7 | "very-low", 8 | "low", 9 | "medium", 10 | "high" 11 | }; 12 | 13 | partial dictionary RTCRtpEncodingParameters { 14 | RTCPriorityType priority = "low"; 15 | RTCPriorityType networkPriority; 16 | }; 17 | 18 | partial interface RTCDataChannel { 19 | readonly attribute RTCPriorityType priority; 20 | }; 21 | 22 | partial dictionary RTCDataChannelInit { 23 | RTCPriorityType priority = "low"; 24 | }; 25 | -------------------------------------------------------------------------------- /js_pyi/w3c_webref/ed/idl/webrtc-svc.idl: -------------------------------------------------------------------------------- 1 | // GENERATED CONTENT - DO NOT EDIT 2 | // Content was automatically extracted by Reffy into webref 3 | // (https://github.com/w3c/webref) 4 | // Source: Scalable Video Coding (SVC) Extension for WebRTC (https://w3c.github.io/webrtc-svc/) 5 | 6 | partial dictionary RTCRtpEncodingParameters { 7 | DOMString scalabilityMode; 8 | }; 9 | 10 | partial dictionary RTCRtpCodecCapability { 11 | sequence scalabilityModes; 12 | }; 13 | -------------------------------------------------------------------------------- /js_pyi/w3c_webref/ed/idl/websockets.idl: -------------------------------------------------------------------------------- 1 | // GENERATED CONTENT - DO NOT EDIT 2 | // Content was automatically extracted by Reffy into webref 3 | // (https://github.com/w3c/webref) 4 | // Source: WebSockets Standard (https://websockets.spec.whatwg.org/) 5 | 6 | enum BinaryType { "blob", "arraybuffer" }; 7 | 8 | [Exposed=(Window,Worker)] 9 | interface WebSocket : EventTarget { 10 | constructor(USVString url, optional (DOMString or sequence) protocols = []); 11 | readonly attribute USVString url; 12 | 13 | // ready state 14 | const unsigned short CONNECTING = 0; 15 | const unsigned short OPEN = 1; 16 | const unsigned short CLOSING = 2; 17 | const unsigned short CLOSED = 3; 18 | readonly attribute unsigned short readyState; 19 | readonly attribute unsigned long long bufferedAmount; 20 | 21 | // networking 22 | attribute EventHandler onopen; 23 | attribute EventHandler onerror; 24 | attribute EventHandler onclose; 25 | readonly attribute DOMString extensions; 26 | readonly attribute DOMString protocol; 27 | undefined close(optional [Clamp] unsigned short code, optional USVString reason); 28 | 29 | // messaging 30 | attribute EventHandler onmessage; 31 | attribute BinaryType binaryType; 32 | undefined send((BufferSource or Blob or USVString) data); 33 | }; 34 | 35 | [Exposed=(Window,Worker)] 36 | interface CloseEvent : Event { 37 | constructor(DOMString type, optional CloseEventInit eventInitDict = {}); 38 | 39 | readonly attribute boolean wasClean; 40 | readonly attribute unsigned short code; 41 | readonly attribute USVString reason; 42 | }; 43 | 44 | dictionary CloseEventInit : EventInit { 45 | boolean wasClean = false; 46 | unsigned short code = 0; 47 | USVString reason = ""; 48 | }; 49 | -------------------------------------------------------------------------------- /js_pyi/w3c_webref/ed/idl/webvtt.idl: -------------------------------------------------------------------------------- 1 | // GENERATED CONTENT - DO NOT EDIT 2 | // Content was automatically extracted by Reffy into webref 3 | // (https://github.com/w3c/webref) 4 | // Source: WebVTT: The Web Video Text Tracks Format (https://w3c.github.io/webvtt/) 5 | 6 | enum AutoKeyword { "auto" }; 7 | typedef (double or AutoKeyword) LineAndPositionSetting; 8 | enum DirectionSetting { "" /* horizontal */, "rl", "lr" }; 9 | enum LineAlignSetting { "start", "center", "end" }; 10 | enum PositionAlignSetting { "line-left", "center", "line-right", "auto" }; 11 | enum AlignSetting { "start", "center", "end", "left", "right" }; 12 | [Exposed=Window] 13 | interface VTTCue : TextTrackCue { 14 | constructor(double startTime, unrestricted double endTime, DOMString text); 15 | attribute VTTRegion? region; 16 | attribute DirectionSetting vertical; 17 | attribute boolean snapToLines; 18 | attribute LineAndPositionSetting line; 19 | attribute LineAlignSetting lineAlign; 20 | attribute LineAndPositionSetting position; 21 | attribute PositionAlignSetting positionAlign; 22 | attribute double size; 23 | attribute AlignSetting align; 24 | attribute DOMString text; 25 | DocumentFragment getCueAsHTML(); 26 | }; 27 | 28 | enum ScrollSetting { "" /* none */, "up" }; 29 | [Exposed=Window] 30 | interface VTTRegion { 31 | constructor(); 32 | attribute DOMString id; 33 | attribute double width; 34 | attribute unsigned long lines; 35 | attribute double regionAnchorX; 36 | attribute double regionAnchorY; 37 | attribute double viewportAnchorX; 38 | attribute double viewportAnchorY; 39 | attribute ScrollSetting scroll; 40 | }; 41 | -------------------------------------------------------------------------------- /js_pyi/w3c_webref/ed/idl/webxr-ar-module.idl: -------------------------------------------------------------------------------- 1 | // GENERATED CONTENT - DO NOT EDIT 2 | // Content was automatically extracted by Reffy into webref 3 | // (https://github.com/w3c/webref) 4 | // Source: WebXR Augmented Reality Module - Level 1 (https://immersive-web.github.io/webxr-ar-module/) 5 | 6 | enum XREnvironmentBlendMode { 7 | "opaque", 8 | "alpha-blend", 9 | "additive" 10 | }; 11 | 12 | partial interface XRSession { 13 | // Attributes 14 | readonly attribute XREnvironmentBlendMode environmentBlendMode; 15 | }; 16 | 17 | enum XRInteractionMode { 18 | "screen-space", 19 | "world-space", 20 | }; 21 | 22 | partial interface XRSession { 23 | // Attributes 24 | readonly attribute XRInteractionMode interactionMode; 25 | }; 26 | 27 | partial interface XRView { 28 | readonly attribute boolean isFirstPersonObserver; 29 | }; 30 | -------------------------------------------------------------------------------- /js_pyi/w3c_webref/ed/idl/webxr-depth-sensing.idl: -------------------------------------------------------------------------------- 1 | // GENERATED CONTENT - DO NOT EDIT 2 | // Content was automatically extracted by Reffy into webref 3 | // (https://github.com/w3c/webref) 4 | // Source: WebXR Depth Sensing Module (https://immersive-web.github.io/depth-sensing/) 5 | 6 | enum XRDepthUsage { 7 | "cpu-optimized", 8 | "gpu-optimized", 9 | }; 10 | 11 | enum XRDepthDataFormat { 12 | "luminance-alpha", 13 | "float32" 14 | }; 15 | 16 | dictionary XRDepthStateInit { 17 | required sequence usagePreference; 18 | required sequence dataFormatPreference; 19 | }; 20 | 21 | partial dictionary XRSessionInit { 22 | XRDepthStateInit depthSensing; 23 | }; 24 | 25 | partial interface XRSession { 26 | readonly attribute XRDepthUsage depthUsage; 27 | readonly attribute XRDepthDataFormat depthDataFormat; 28 | }; 29 | 30 | [SecureContext, Exposed=Window] 31 | interface XRDepthInformation { 32 | readonly attribute unsigned long width; 33 | readonly attribute unsigned long height; 34 | 35 | [SameObject] readonly attribute XRRigidTransform normDepthBufferFromNormView; 36 | readonly attribute float rawValueToMeters; 37 | }; 38 | 39 | [Exposed=Window] 40 | interface XRCPUDepthInformation : XRDepthInformation { 41 | [SameObject] readonly attribute ArrayBuffer data; 42 | 43 | float getDepthInMeters(float x, float y); 44 | }; 45 | 46 | partial interface XRFrame { 47 | XRCPUDepthInformation? getDepthInformation(XRView view); 48 | }; 49 | 50 | [Exposed=Window] 51 | interface XRWebGLDepthInformation : XRDepthInformation { 52 | [SameObject] readonly attribute WebGLTexture texture; 53 | }; 54 | 55 | partial interface XRWebGLBinding { 56 | XRWebGLDepthInformation? getDepthInformation(XRView view); 57 | }; 58 | -------------------------------------------------------------------------------- /js_pyi/w3c_webref/ed/idl/webxr-dom-overlays.idl: -------------------------------------------------------------------------------- 1 | // GENERATED CONTENT - DO NOT EDIT 2 | // Content was automatically extracted by Reffy into webref 3 | // (https://github.com/w3c/webref) 4 | // Source: WebXR DOM Overlays Module (https://immersive-web.github.io/dom-overlays/) 5 | 6 | partial interface mixin GlobalEventHandlers { 7 | attribute EventHandler onbeforexrselect; 8 | }; 9 | 10 | partial dictionary XRSessionInit { 11 | XRDOMOverlayInit? domOverlay; 12 | }; 13 | 14 | partial interface XRSession { 15 | readonly attribute XRDOMOverlayState? domOverlayState; 16 | }; 17 | 18 | dictionary XRDOMOverlayInit { 19 | required Element root; 20 | }; 21 | 22 | enum XRDOMOverlayType { 23 | "screen", 24 | "floating", 25 | "head-locked" 26 | }; 27 | 28 | dictionary XRDOMOverlayState { 29 | XRDOMOverlayType type; 30 | 31 | }; 32 | -------------------------------------------------------------------------------- /js_pyi/w3c_webref/ed/idl/webxr-gamepads-module.idl: -------------------------------------------------------------------------------- 1 | // GENERATED CONTENT - DO NOT EDIT 2 | // Content was automatically extracted by Reffy into webref 3 | // (https://github.com/w3c/webref) 4 | // Source: WebXR Gamepads Module - Level 1 (https://immersive-web.github.io/webxr-gamepads-module/) 5 | 6 | partial interface XRInputSource { 7 | [SameObject] readonly attribute Gamepad? gamepad; 8 | }; 9 | -------------------------------------------------------------------------------- /js_pyi/w3c_webref/ed/idl/webxr-lighting-estimation.idl: -------------------------------------------------------------------------------- 1 | // GENERATED CONTENT - DO NOT EDIT 2 | // Content was automatically extracted by Reffy into webref 3 | // (https://github.com/w3c/webref) 4 | // Source: WebXR Lighting Estimation API Level 1 (https://immersive-web.github.io/lighting-estimation/) 5 | 6 | [SecureContext, Exposed=Window] 7 | interface XRLightProbe : EventTarget { 8 | readonly attribute XRSpace probeSpace; 9 | attribute EventHandler onreflectionchange; 10 | }; 11 | 12 | enum XRReflectionFormat { 13 | "srgba8", 14 | "rgba16f", 15 | }; 16 | 17 | [SecureContext, Exposed=Window] 18 | interface XRLightEstimate { 19 | readonly attribute Float32Array sphericalHarmonicsCoefficients; 20 | readonly attribute DOMPointReadOnly primaryLightDirection; 21 | readonly attribute DOMPointReadOnly primaryLightIntensity; 22 | }; 23 | 24 | dictionary XRLightProbeInit { 25 | XRReflectionFormat reflectionFormat = "srgba8"; 26 | }; 27 | 28 | partial interface XRSession { 29 | Promise requestLightProbe(optional XRLightProbeInit options = {}); 30 | readonly attribute XRReflectionFormat preferredReflectionFormat; 31 | }; 32 | 33 | partial interface XRFrame { 34 | XRLightEstimate? getLightEstimate(XRLightProbe lightProbe); 35 | }; 36 | 37 | partial interface XRWebGLBinding { 38 | WebGLTexture? getReflectionCubeMap(XRLightProbe lightProbe); 39 | }; 40 | -------------------------------------------------------------------------------- /js_pyi/w3c_webref/ed/idl/window-controls-overlay.idl: -------------------------------------------------------------------------------- 1 | // GENERATED CONTENT - DO NOT EDIT 2 | // Content was automatically extracted by Reffy into webref 3 | // (https://github.com/w3c/webref) 4 | // Source: Window Controls Overlay (https://wicg.github.io/window-controls-overlay/) 5 | 6 | [SecureContext, Exposed=(Window)] 7 | partial interface Navigator { 8 | [SameObject] readonly attribute WindowControlsOverlay windowControlsOverlay; 9 | }; 10 | 11 | [Exposed=Window] 12 | interface WindowControlsOverlay : EventTarget { 13 | readonly attribute boolean visible; 14 | DOMRect getTitlebarAreaRect(); 15 | attribute EventHandler ongeometrychange; 16 | }; 17 | 18 | [Exposed=Window] 19 | interface WindowControlsOverlayGeometryChangeEvent : Event { 20 | constructor(DOMString type, WindowControlsOverlayGeometryChangeEventInit eventInitDict); 21 | [SameObject] readonly attribute DOMRect titlebarAreaRect; 22 | readonly attribute boolean visible; 23 | }; 24 | 25 | dictionary WindowControlsOverlayGeometryChangeEventInit : EventInit { 26 | required DOMRect titlebarAreaRect; 27 | boolean visible = false; 28 | }; 29 | -------------------------------------------------------------------------------- /js_pyi/w3c_webref/ed/idl/window-placement.idl: -------------------------------------------------------------------------------- 1 | // GENERATED CONTENT - DO NOT EDIT 2 | // Content was automatically extracted by Reffy into webref 3 | // (https://github.com/w3c/webref) 4 | // Source: Multi-Screen Window Placement (https://w3c.github.io/window-placement/) 5 | 6 | partial interface Screen /* : EventTarget */ { 7 | [SecureContext] 8 | readonly attribute boolean isExtended; 9 | 10 | [SecureContext] 11 | attribute EventHandler onchange; 12 | }; 13 | 14 | partial interface Window { 15 | [SecureContext] 16 | Promise getScreenDetails(); 17 | }; 18 | 19 | [Exposed=Window, SecureContext] 20 | interface ScreenDetails : EventTarget { 21 | readonly attribute FrozenArray screens; 22 | readonly attribute ScreenDetailed currentScreen; 23 | 24 | attribute EventHandler onscreenschange; 25 | attribute EventHandler oncurrentscreenchange; 26 | }; 27 | 28 | [Exposed=Window, SecureContext] 29 | interface ScreenDetailed : Screen { 30 | readonly attribute long availLeft; 31 | readonly attribute long availTop; 32 | readonly attribute long left; 33 | readonly attribute long top; 34 | readonly attribute boolean isPrimary; 35 | readonly attribute boolean isInternal; 36 | readonly attribute float devicePixelRatio; 37 | readonly attribute DOMString label; 38 | }; 39 | 40 | partial dictionary FullscreenOptions { 41 | ScreenDetailed screen; 42 | }; 43 | -------------------------------------------------------------------------------- /js_pyi/webidls.py: -------------------------------------------------------------------------------- 1 | from pathlib import Path 2 | from typing import List 3 | 4 | 5 | def find(filename: str) -> Path: 6 | for file in _find_all(): 7 | if file.name == filename: 8 | return file 9 | raise Exception(f"not found: `{file}`") 10 | 11 | 12 | def find_all() -> List[Path]: 13 | return list(sorted(_find_all())) 14 | 15 | 16 | def _find_all(): 17 | parent = Path(__file__).parent 18 | 19 | yield from _yield_path(parent / "w3c_webref/ed/idl", "*.idl") 20 | yield from _yield_path(parent / "webidls-manual", "*.webidl") 21 | 22 | 23 | def _yield_path(path, webidl): 24 | files = list(path.glob(webidl)) 25 | yield from files 26 | -------------------------------------------------------------------------------- /pypi_helper_test.py: -------------------------------------------------------------------------------- 1 | from __future__ import annotations 2 | 3 | import subprocess 4 | from pathlib import Path 5 | 6 | from pypi_helper import Pyproject 7 | from pypi_helper import update_minor_version 8 | 9 | pyproject_content = """ 10 | [project] 11 | name = "wwwpy" 12 | version = "0.1.38" 13 | """ 14 | 15 | 16 | def test_Pyproject_properties(): 17 | target = Pyproject(pyproject_content) 18 | 19 | assert target.version == "0.1.38" 20 | assert target.content == pyproject_content 21 | 22 | 23 | def test_Pyproject_version_inc_minor(): 24 | target = Pyproject(pyproject_content) 25 | target.version_inc_minor() 26 | 27 | assert target.version == "0.1.39" 28 | assert target.content == pyproject_content.replace("0.1.38", "0.1.39") 29 | 30 | 31 | def test_Pyproject_without_args__should_load_pyproject_toml(tmp_path): 32 | target = Pyproject() 33 | assert target.version 34 | assert target.content 35 | 36 | 37 | def test_update_minor_version(tmp_path): 38 | file = tmp_path / "pyproject.toml" 39 | file.write_text(pyproject_content) 40 | 41 | result = update_minor_version(file) 42 | assert result == "Updated version to 0.1.39" 43 | updated_content = file.read_text() 44 | assert 'version = "0.1.39"' in updated_content 45 | 46 | 47 | def test_do_not_add_cr(tmp_path): 48 | file = tmp_path / "pyproject.toml" 49 | file.write_text('[project]\nversion = "0.1.38"\n#comment') 50 | 51 | update_minor_version(file) 52 | 53 | assert file.read_text() == '[project]\nversion = "0.1.39"\n#comment' 54 | -------------------------------------------------------------------------------- /pypi_inc_minor.py: -------------------------------------------------------------------------------- 1 | from __future__ import annotations 2 | 3 | import subprocess 4 | 5 | from pypi_helper import uncommitted_changes, update_minor_version, write_build_meta 6 | 7 | 8 | def main(): 9 | if uncommitted_changes(): 10 | return 11 | 12 | msg = update_minor_version() 13 | if msg: 14 | print("=== committing changes") 15 | write_build_meta() 16 | subprocess.run(["git", "commit", "-am", msg]) 17 | 18 | 19 | if __name__ == "__main__": 20 | main() 21 | -------------------------------------------------------------------------------- /pypi_upload.py: -------------------------------------------------------------------------------- 1 | import glob 2 | import os 3 | import subprocess 4 | import sys 5 | 6 | from pypi_helper import uncommitted_changes 7 | 8 | 9 | def main(): 10 | if uncommitted_changes(): 11 | return 12 | # Load environment variables from .env 13 | with open(".env") as f: 14 | for line in f: 15 | line = line.strip() 16 | if not line or line.startswith("#"): 17 | continue 18 | if "=" in line: 19 | key, value = line.split("=", 1) 20 | os.environ[key] = value 21 | 22 | # Remove all files in dist/ 23 | dist_files = glob.glob("dist/*") 24 | for file in dist_files: 25 | os.remove(file) 26 | 27 | # Build the package 28 | try: 29 | subprocess.run([sys.executable, "-m", "build"], check=True) 30 | except subprocess.CalledProcessError as e: 31 | sys.exit(e.returncode) 32 | 33 | # Upload the package to PyPI 34 | dist_files = glob.glob("dist/*") 35 | if dist_files: 36 | subprocess.run( 37 | [sys.executable, "-m", "twine", "upload"] + dist_files, check=True 38 | ) 39 | subprocess.run(["git", "push"]) 40 | else: 41 | print("No files found in dist/ to upload.") 42 | 43 | 44 | if __name__ == "__main__": 45 | main() 46 | -------------------------------------------------------------------------------- /pyproject.toml: -------------------------------------------------------------------------------- 1 | [project] 2 | name = "webtypy" 3 | version = "0.1.8.dev2" 4 | description = "This module contains the DOM types for the majority of the web APIs used in a web browser. These can be used by an IDE to give type hinting and completion during the development using DOM apis." 5 | readme = "README.md" 6 | requires-python = ">=3.6" 7 | license = { file = "LICENCE" } 8 | authors = [{ name = "Simone Giacomelli", email = "simone.giacomelli@gmail.com" }] 9 | keywords = [] 10 | classifiers = [ 11 | "License :: OSI Approved :: Mozilla Public License 2.0 (MPL 2.0)", 12 | ] 13 | 14 | [project.urls] 15 | Homepage = "https://github.com/pyodide/webtypy" 16 | 17 | [project.optional-dependencies] 18 | dev = [ 19 | "pytest==8.3.4", 20 | "widlparser==1.1.5", 21 | "black==24.10.0" 22 | ] 23 | pypi = [ 24 | "build==0.6.0.post1", 25 | "twine==3.4.2", 26 | "wheel==0.37.0", 27 | ] 28 | 29 | [tool.setuptools.packages.find] 30 | where = ["src"] 31 | include = ["js-stubs"] 32 | 33 | [tool.setuptools.package-data] 34 | "*" = ["py.typed", "*.pyi"] 35 | 36 | [tool.setuptools] 37 | zip-safe = false 38 | include-package-data = true 39 | 40 | [build-system] 41 | requires = ["setuptools", "wheel"] 42 | build-backend = "setuptools.build_meta" 43 | -------------------------------------------------------------------------------- /tests/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pyodide/webtypy/f402468e5e3ec0747b6ed8948ea96639c2d9f766/tests/__init__.py -------------------------------------------------------------------------------- /tests/produce_test.py: -------------------------------------------------------------------------------- 1 | import ast 2 | 3 | from js_pyi.produce import produce, parse_product 4 | from js_pyi.webidls import find 5 | 6 | 7 | def x_test_correctness_quick_0(): 8 | actual = produce([find("Element.webidl")]) 9 | print(actual) 10 | ast.parse(actual) 11 | 12 | assert ( 13 | "class Element(Node, ChildNode, NonDocumentTypeChildNode, ParentNode, Animatable, GeometryUtils):" 14 | in actual 15 | ) 16 | expected = ["ScrollLogicalPosition", "start", "center", "end"] 17 | for each in expected: 18 | assert each in actual 19 | 20 | 21 | def x_test_correctness_quick_1(): 22 | actual = produce([find("Document.webidl")]) 23 | assert "class Document(Node" in actual 24 | ast.parse(actual) 25 | 26 | 27 | def test_correctness_slow_0(): 28 | success = parse_product() 29 | assert success 30 | -------------------------------------------------------------------------------- /tests/webidls_test.py: -------------------------------------------------------------------------------- 1 | from js_pyi.webidls import find, find_all 2 | 3 | 4 | def x_test_webidls_presence(): 5 | assert "interface Document" in find("Document.webidl").read_text() 6 | assert "interface Bluetooth" in find("Bluetooth.webidl").read_text() 7 | assert "interface PaymentRequest" in find("PaymentRequest.webidl").read_text() 8 | 9 | 10 | def x_test_findall(): 11 | actual = find_all() 12 | assert find("Document.webidl") in actual 13 | assert find("Bluetooth.webidl") in actual 14 | assert find("PaymentRequest.webidl") in actual 15 | assert find("FileMode.webidl") in actual 16 | --------------------------------------------------------------------------------