diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 50d95ce0..26859be7 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -25,7 +25,7 @@ jobs: sdk: [beta] steps: - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 - - uses: dart-lang/setup-dart@b64355ae6ca0b5d484f0106a033dd1388965d06d + - uses: dart-lang/setup-dart@fedb1266e91cf51be2fdb382869461a434b920a3 with: sdk: ${{ matrix.sdk }} - id: install @@ -50,13 +50,15 @@ jobs: sdk: [dev, beta] steps: - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 - - uses: dart-lang/setup-dart@b64355ae6ca0b5d484f0106a033dd1388965d06d + - uses: dart-lang/setup-dart@fedb1266e91cf51be2fdb382869461a434b920a3 with: sdk: ${{ matrix.sdk }} - name: Install dependencies run: dart pub get - - name: Run Chrome tests + - name: Run Chrome tests - js run: dart test --platform chrome + - name: Run Chrome tests - wasm + run: dart test --platform chrome --compiler dart2wasm # Ensure the generation script runs. generation: @@ -69,7 +71,7 @@ jobs: sdk: [main, dev] steps: - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 - - uses: dart-lang/setup-dart@b64355ae6ca0b5d484f0106a033dd1388965d06d + - uses: dart-lang/setup-dart@fedb1266e91cf51be2fdb382869461a434b920a3 with: sdk: ${{ matrix.sdk }} - name: Install Dart dependencies @@ -93,7 +95,7 @@ jobs: sdk: [main] steps: - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 - - uses: dart-lang/setup-dart@b64355ae6ca0b5d484f0106a033dd1388965d06d + - uses: dart-lang/setup-dart@fedb1266e91cf51be2fdb382869461a434b920a3 with: sdk: ${{ matrix.sdk }} - name: Install Dart dependencies diff --git a/CHANGELOG.md b/CHANGELOG.md index e00c1207..3a078bad 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,34 @@ - Contribute a markdown file for the renamed classes from `dart:html` to `package:web` (see [renames.md](tool/renames.md)). - Migrate classes to use interop extension types that implement `JSObject`. +- Add generics to APIs that use `JSArray` and `JSPromise`. Typedefs of a Dart + primitive type are instead replaced with their JS type equivalent if they + appear as a type parameter in order to conform with the type bounds of + `JSArray` and `JSPromise`. +- Changed `record` types to be `JSObject` instead of `JSAny`. +- Reduce the number of DOM APIs we generate code for. Currently, the API needs + to be standards-track, and be supported by Safari, Chrome, and Firefox. +- Updated the source IDL version to `3.43.1`. +- Deprecate a few type aliases in favor of their standardized versions: + + | Deprecated | Preferred | + |-----------------------|-------------------------| + | `AudioElement` | `HTMLAudioElement` | + | `HtmlElement` | `HTMLElement` | + | `CanvasElement` | `HTMLCanvasElement` | + | `ImageElement` | `HTMLImageElement` | + | `VideoElement` | `HTMLVideoElement` | + | `CssStyleDeclaration` | `CSSStyleDeclaration` | + | `ContextEvent` | `WebGLContextEvent` | + | `WebGL` | `WebGLRenderingContext` | + +- Deprecate the top-level `createElementTag`, `createCanvasElement`, + `createIFrameElement`, and `querySelector` functions. + Instead, use the standard creation and query methods on `document`. +- Deprecate the `client` extension methods on `MouseEvent` and `Touch`. + Instead, directly use the `clientX` and `clientY` properties. +- Deprecate the `HttpRequest` API borrowed from `dart:html`. + Consider migrating to `package:http` instead. - Include MDN API documentation as class and member dartdoc comments. - Docs sourced from the [MDN Web Docs][] project; attributions and copyright licensing by Mozilla Contributors is licensed under [CC-BY-SA 2.5][]. diff --git a/README.md b/README.md index 48733327..880fecfe 100644 --- a/README.md +++ b/README.md @@ -14,12 +14,6 @@ This package is intended to replace similar Dart SDK libraries. It will support access to browser APIs from Dart code compiled to either JavaScript or WebAssembly. -## Status - -The APIs in this package are still fairly provisional and could change rapidly. -We'll continue to use [semantic versioning](https://semver.org/) as we evolve -the APIs. - ## Usage ```dart @@ -36,8 +30,8 @@ void main() { Based on: -- @webref/idl [3.39.1](https://www.npmjs.com/package/@webref/idl/v/3.39.1) -- @webref/css [6.10.0](https://www.npmjs.com/package/@webref/css/v/6.10.0) +- @webref/idl [3.43.1](https://www.npmjs.com/package/@webref/idl/v/3.43.1) +- @webref/css [6.11.0](https://www.npmjs.com/package/@webref/css/v/6.11.0) For instructions on re-generating the DOM bindings, see the diff --git a/analysis_options.yaml b/analysis_options.yaml index 2dabec3b..15660257 100644 --- a/analysis_options.yaml +++ b/analysis_options.yaml @@ -18,6 +18,8 @@ analyzer: lines_longer_than_80_chars: ignore # 1,333 instances in generated code. non_constant_identifier_names: ignore + # Consider removing from dart_flutter_team_lints. + unreachable_from_main: ignore linter: rules: diff --git a/lib/fix_data.yaml b/lib/fix_data.yaml index f3ae2ab6..7d6fc6c8 100644 --- a/lib/fix_data.yaml +++ b/lib/fix_data.yaml @@ -26,33 +26,24 @@ transforms: changes: - kind: 'rename' newName: 'HTMLAreaElement' - # AudioElement => HTMLAudioElement (see test_fixes/README.md) - # - title: "Rename to 'HTMLAudioElement'" - # date: 2024-01-12 - # element: - # uris: [ 'package:web/web.dart' ] - # class: 'AudioElement' - # changes: - # - kind: 'rename' - # newName: 'HTMLAudioElement' - # BaseElement => HTMLBaseElement - - title: "Rename to 'HTMLBaseElement'" + # AudioElement => HTMLAudioElement + - title: "Rename to 'HTMLAudioElement'" date: 2024-01-12 element: uris: [ 'package:web/web.dart' ] - class: 'BaseElement' + class: 'AudioElement' changes: - kind: 'rename' - newName: 'HTMLBaseElement' - # BluetoothRemoteGattDescriptor => BluetoothRemoteGATTDescriptor - - title: "Rename to 'BluetoothRemoteGATTDescriptor'" + newName: 'HTMLAudioElement' + # BaseElement => HTMLBaseElement + - title: "Rename to 'HTMLBaseElement'" date: 2024-01-12 element: uris: [ 'package:web/web.dart' ] - class: 'BluetoothRemoteGattDescriptor' + class: 'BaseElement' changes: - kind: 'rename' - newName: 'BluetoothRemoteGATTDescriptor' + newName: 'HTMLBaseElement' # BodyElement => HTMLBodyElement - title: "Rename to 'HTMLBodyElement'" date: 2024-01-12 @@ -80,33 +71,24 @@ transforms: changes: - kind: 'rename' newName: 'HTMLButtonElement' - # CanvasElement => HTMLCanvasElement (see test_fixes/README.md) - # - title: "Rename to 'HTMLCanvasElement'" - # date: 2024-01-12 - # element: - # uris: [ 'package:web/web.dart' ] - # class: 'CanvasElement' - # changes: - # - kind: 'rename' - # newName: 'HTMLCanvasElement' - # CDataSection => CDATASection - - title: "Rename to 'CDATASection'" + # CanvasElement => HTMLCanvasElement + - title: "Rename to 'HTMLCanvasElement'" date: 2024-01-12 element: uris: [ 'package:web/web.dart' ] - class: 'CDataSection' + class: 'CanvasElement' changes: - kind: 'rename' - newName: 'CDATASection' - # Css => CSS - - title: "Rename to 'CSS'" + newName: 'HTMLCanvasElement' + # CDataSection => CDATASection + - title: "Rename to 'CDATASection'" date: 2024-01-12 element: uris: [ 'package:web/web.dart' ] - class: 'Css' + class: 'CDataSection' changes: - kind: 'rename' - newName: 'CSS' + newName: 'CDATASection' # CssConditionRule => CSSConditionRule - title: "Rename to 'CSSConditionRule'" date: 2024-01-12 @@ -260,15 +242,15 @@ transforms: changes: - kind: 'rename' newName: 'CSSSkew' - # CssStyleDeclaration => CSSStyleDeclaration (see test_fixes/README.md) - # - title: "Rename to 'CSSStyleDeclaration'" - # date: 2024-01-12 - # element: - # uris: [ 'package:web/web.dart' ] - # class: 'CssStyleDeclaration' - # changes: - # - kind: 'rename' - # newName: 'CSSStyleDeclaration' + # CssStyleDeclaration => CSSStyleDeclaration + - title: "Rename to 'CSSStyleDeclaration'" + date: 2024-01-12 + element: + uris: [ 'package:web/web.dart' ] + class: 'CssStyleDeclaration' + changes: + - kind: 'rename' + newName: 'CSSStyleDeclaration' # CssStyleRule => CSSStyleRule - title: "Rename to 'CSSStyleRule'" date: 2024-01-12 @@ -620,15 +602,15 @@ transforms: changes: - kind: 'rename' newName: 'Document' - # HtmlElement => HTMLElement (see test_fixes/README.md) - # - title: "Rename to 'HTMLElement'" - # date: 2024-01-12 - # element: - # uris: [ 'package:web/web.dart' ] - # class: 'HtmlElement' - # changes: - # - kind: 'rename' - # newName: 'HTMLElement' + # HtmlElement => HTMLElement + - title: "Rename to 'HTMLElement'" + date: 2024-01-12 + element: + uris: [ 'package:web/web.dart' ] + class: 'HtmlElement' + changes: + - kind: 'rename' + newName: 'HTMLElement' # HtmlFormControlsCollection => HTMLFormControlsCollection - title: "Rename to 'HTMLFormControlsCollection'" date: 2024-01-12 @@ -647,15 +629,6 @@ transforms: changes: - kind: 'rename' newName: 'HTMLHtmlElement' - # HtmlHyperlinkElementUtils => HTMLHyperlinkElementUtils - - title: "Rename to 'HTMLHyperlinkElementUtils'" - date: 2024-01-12 - element: - uris: [ 'package:web/web.dart' ] - class: 'HtmlHyperlinkElementUtils' - changes: - - kind: 'rename' - newName: 'HTMLHyperlinkElementUtils' # HtmlOptionsCollection => HTMLOptionsCollection - title: "Rename to 'HTMLOptionsCollection'" date: 2024-01-12 @@ -701,15 +674,15 @@ transforms: changes: - kind: 'rename' newName: 'HTMLIFrameElement' - # ImageElement => HTMLImageElement (see test_fixes/README.md) - # - title: "Rename to 'HTMLImageElement'" - # date: 2024-01-12 - # element: - # uris: [ 'package:web/web.dart' ] - # class: 'ImageElement' - # changes: - # - kind: 'rename' - # newName: 'HTMLImageElement' + # ImageElement => HTMLImageElement + - title: "Rename to 'HTMLImageElement'" + date: 2024-01-12 + element: + uris: [ 'package:web/web.dart' ] + class: 'ImageElement' + changes: + - kind: 'rename' + newName: 'HTMLImageElement' # InputElement => HTMLInputElement - title: "Rename to 'HTMLInputElement'" date: 2024-01-12 @@ -800,78 +773,6 @@ transforms: changes: - kind: 'rename' newName: 'HTMLMeterElement' - # MidiAccess => MIDIAccess - - title: "Rename to 'MIDIAccess'" - date: 2024-01-12 - element: - uris: [ 'package:web/web.dart' ] - class: 'MidiAccess' - changes: - - kind: 'rename' - newName: 'MIDIAccess' - # MidiConnectionEvent => MIDIConnectionEvent - - title: "Rename to 'MIDIConnectionEvent'" - date: 2024-01-12 - element: - uris: [ 'package:web/web.dart' ] - class: 'MidiConnectionEvent' - changes: - - kind: 'rename' - newName: 'MIDIConnectionEvent' - # MidiInput => MIDIInput - - title: "Rename to 'MIDIInput'" - date: 2024-01-12 - element: - uris: [ 'package:web/web.dart' ] - class: 'MidiInput' - changes: - - kind: 'rename' - newName: 'MIDIInput' - # MidiInputMap => MIDIInputMap - - title: "Rename to 'MIDIInputMap'" - date: 2024-01-12 - element: - uris: [ 'package:web/web.dart' ] - class: 'MidiInputMap' - changes: - - kind: 'rename' - newName: 'MIDIInputMap' - # MidiMessageEvent => MIDIMessageEvent - - title: "Rename to 'MIDIMessageEvent'" - date: 2024-01-12 - element: - uris: [ 'package:web/web.dart' ] - class: 'MidiMessageEvent' - changes: - - kind: 'rename' - newName: 'MIDIMessageEvent' - # MidiOutput => MIDIOutput - - title: "Rename to 'MIDIOutput'" - date: 2024-01-12 - element: - uris: [ 'package:web/web.dart' ] - class: 'MidiOutput' - changes: - - kind: 'rename' - newName: 'MIDIOutput' - # MidiOutputMap => MIDIOutputMap - - title: "Rename to 'MIDIOutputMap'" - date: 2024-01-12 - element: - uris: [ 'package:web/web.dart' ] - class: 'MidiOutputMap' - changes: - - kind: 'rename' - newName: 'MIDIOutputMap' - # MidiPort => MIDIPort - - title: "Rename to 'MIDIPort'" - date: 2024-01-12 - element: - uris: [ 'package:web/web.dart' ] - class: 'MidiPort' - changes: - - kind: 'rename' - newName: 'MIDIPort' # ModElement => HTMLModElement - title: "Rename to 'HTMLModElement'" date: 2024-01-12 @@ -1277,24 +1178,6 @@ transforms: changes: - kind: 'rename' newName: 'HTMLTrackElement' - # TrustedHtml => TrustedHTML - - title: "Rename to 'TrustedHTML'" - date: 2024-01-12 - element: - uris: [ 'package:web/web.dart' ] - class: 'TrustedHtml' - changes: - - kind: 'rename' - newName: 'TrustedHTML' - # TrustedScriptUrl => TrustedScriptURL - - title: "Rename to 'TrustedScriptURL'" - date: 2024-01-12 - element: - uris: [ 'package:web/web.dart' ] - class: 'TrustedScriptUrl' - changes: - - kind: 'rename' - newName: 'TrustedScriptURL' # UListElement => HTMLUListElement - title: "Rename to 'HTMLUListElement'" date: 2024-01-12 @@ -1340,15 +1223,15 @@ transforms: changes: - kind: 'rename' newName: 'URLSearchParams' - # VideoElement => HTMLVideoElement (see test_fixes/README.md) - # - title: "Rename to 'HTMLVideoElement'" - # date: 2024-01-12 - # element: - # uris: [ 'package:web/web.dart' ] - # class: 'VideoElement' - # changes: - # - kind: 'rename' - # newName: 'HTMLVideoElement' + # VideoElement => HTMLVideoElement + - title: "Rename to 'HTMLVideoElement'" + date: 2024-01-12 + element: + uris: [ 'package:web/web.dart' ] + class: 'VideoElement' + changes: + - kind: 'rename' + newName: 'HTMLVideoElement' # VttCue => VTTCue - title: "Rename to 'VTTCue'" date: 2024-01-12 diff --git a/lib/src/dom.dart b/lib/src/dom.dart index 74c55267..a426364e 100644 --- a/lib/src/dom.dart +++ b/lib/src/dom.dart @@ -2,79 +2,37 @@ // for details. All rights reserved. Use of this source code is governed by a // BSD-style license that can be found in the LICENSE file. -export 'dom/accelerometer.dart'; -export 'dom/ambient_light.dart'; -export 'dom/anchors.dart'; export 'dom/angle_instanced_arrays.dart'; -export 'dom/attribution_reporting_api.dart'; -export 'dom/audio_output.dart'; -export 'dom/audio_session.dart'; -export 'dom/autoplay_detection.dart'; -export 'dom/background_fetch.dart'; -export 'dom/background_sync.dart'; -export 'dom/battery_status.dart'; -export 'dom/capture_handle_identity.dart'; -export 'dom/captured_mouse_events.dart'; export 'dom/clipboard_apis.dart'; export 'dom/compression.dart'; -export 'dom/compute_pressure.dart'; export 'dom/console.dart'; -export 'dom/contact_picker.dart'; -export 'dom/content_index.dart'; -export 'dom/cookie_store.dart'; -export 'dom/crash_reporting.dart'; export 'dom/credential_management.dart'; export 'dom/csp.dart'; -export 'dom/csp_next.dart'; -export 'dom/css_anchor_position.dart'; -export 'dom/css_animation_worklet.dart'; export 'dom/css_animations.dart'; export 'dom/css_animations_2.dart'; export 'dom/css_cascade.dart'; -export 'dom/css_cascade_6.dart'; -export 'dom/css_color_5.dart'; export 'dom/css_conditional.dart'; -export 'dom/css_contain.dart'; export 'dom/css_contain_3.dart'; export 'dom/css_counter_styles.dart'; export 'dom/css_font_loading.dart'; export 'dom/css_fonts.dart'; export 'dom/css_highlight_api.dart'; -export 'dom/css_layout_api.dart'; export 'dom/css_masking.dart'; -export 'dom/css_nav.dart'; -export 'dom/css_paint_api.dart'; -export 'dom/css_parser_api.dart'; export 'dom/css_properties_values_api.dart'; -export 'dom/css_pseudo.dart'; -export 'dom/css_regions.dart'; export 'dom/css_transitions.dart'; export 'dom/css_transitions_2.dart'; export 'dom/css_typed_om.dart'; export 'dom/css_view_transitions.dart'; -export 'dom/css_view_transitions_2.dart'; export 'dom/cssom.dart'; export 'dom/cssom_view.dart'; -export 'dom/custom_state_pseudo_class.dart'; -export 'dom/datacue.dart'; -export 'dom/deprecation_reporting.dart'; -export 'dom/device_posture.dart'; -export 'dom/digital_goods.dart'; -export 'dom/document_picture_in_picture.dart'; export 'dom/dom.dart'; export 'dom/dom_parsing.dart'; -export 'dom/edit_context.dart'; -export 'dom/element_capture.dart'; -export 'dom/element_timing.dart'; export 'dom/encoding.dart'; export 'dom/encrypted_media.dart'; export 'dom/entries_api.dart'; -export 'dom/event_timing.dart'; export 'dom/ext_blend_minmax.dart'; export 'dom/ext_color_buffer_float.dart'; export 'dom/ext_color_buffer_half_float.dart'; -export 'dom/ext_disjoint_timer_query.dart'; -export 'dom/ext_disjoint_timer_query_webgl2.dart'; export 'dom/ext_float_blend.dart'; export 'dom/ext_frag_depth.dart'; export 'dom/ext_shader_texture_lod.dart'; @@ -82,64 +40,25 @@ export 'dom/ext_srgb.dart'; export 'dom/ext_texture_compression_bptc.dart'; export 'dom/ext_texture_compression_rgtc.dart'; export 'dom/ext_texture_filter_anisotropic.dart'; -export 'dom/ext_texture_norm16.dart'; -export 'dom/eyedropper_api.dart'; -export 'dom/fedcm.dart'; -export 'dom/fenced_frame.dart'; export 'dom/fetch.dart'; -export 'dom/fido.dart'; -export 'dom/file_system_access.dart'; export 'dom/fileapi.dart'; export 'dom/filter_effects.dart'; -export 'dom/font_metrics_api.dart'; export 'dom/fs.dart'; -export 'dom/fullscreen.dart'; export 'dom/gamepad.dart'; -export 'dom/gamepad_extensions.dart'; -export 'dom/generic_sensor.dart'; export 'dom/geolocation.dart'; -export 'dom/geolocation_sensor.dart'; export 'dom/geometry.dart'; -export 'dom/get_installed_related_apps.dart'; -export 'dom/gyroscope.dart'; export 'dom/hr_time.dart'; export 'dom/html.dart'; -export 'dom/idle_detection.dart'; -export 'dom/image_capture.dart'; -export 'dom/image_resource.dart'; export 'dom/indexeddb.dart'; -export 'dom/ink_enhancement.dart'; -export 'dom/input_device_capabilities.dart'; export 'dom/intersection_observer.dart'; -export 'dom/intervention_reporting.dart'; -export 'dom/is_input_pending.dart'; -export 'dom/js_self_profiling.dart'; -export 'dom/keyboard_lock.dart'; -export 'dom/keyboard_map.dart'; -export 'dom/khr_parallel_shader_compile.dart'; -export 'dom/largest_contentful_paint.dart'; -export 'dom/layout_instability.dart'; -export 'dom/local_font_access.dart'; -export 'dom/longtasks.dart'; -export 'dom/magnetometer.dart'; -export 'dom/manifest_incubations.dart'; export 'dom/mathml_core.dart'; export 'dom/media_capabilities.dart'; export 'dom/media_playback_quality.dart'; export 'dom/media_source.dart'; -export 'dom/mediacapture_automation.dart'; -export 'dom/mediacapture_fromelement.dart'; -export 'dom/mediacapture_handle_actions.dart'; -export 'dom/mediacapture_region.dart'; export 'dom/mediacapture_streams.dart'; -export 'dom/mediacapture_transform.dart'; -export 'dom/mediacapture_viewport.dart'; export 'dom/mediasession.dart'; export 'dom/mediastream_recording.dart'; -export 'dom/model_element.dart'; -export 'dom/mst_content_hint.dart'; export 'dom/navigation_timing.dart'; -export 'dom/netinfo.dart'; export 'dom/notifications.dart'; export 'dom/oes_draw_buffers_indexed.dart'; export 'dom/oes_element_index_uint.dart'; @@ -151,131 +70,52 @@ export 'dom/oes_texture_half_float.dart'; export 'dom/oes_texture_half_float_linear.dart'; export 'dom/oes_vertex_array_object.dart'; export 'dom/orientation_event.dart'; -export 'dom/orientation_sensor.dart'; -export 'dom/ovr_multiview2.dart'; -export 'dom/page_lifecycle.dart'; export 'dom/paint_timing.dart'; -export 'dom/payment_handler.dart'; export 'dom/payment_request.dart'; -export 'dom/performance_measure_memory.dart'; export 'dom/performance_timeline.dart'; -export 'dom/periodic_background_sync.dart'; export 'dom/permissions.dart'; -export 'dom/permissions_policy.dart'; -export 'dom/picture_in_picture.dart'; export 'dom/pointerevents.dart'; -export 'dom/portals.dart'; -export 'dom/presentation_api.dart'; -export 'dom/private_network_access.dart'; -export 'dom/proximity.dart'; export 'dom/push_api.dart'; -export 'dom/raw_camera_access.dart'; -export 'dom/real_world_meshing.dart'; export 'dom/referrer_policy.dart'; -export 'dom/remote_playback.dart'; export 'dom/reporting.dart'; -export 'dom/requestidlecallback.dart'; -export 'dom/requeststorageaccessfor.dart'; export 'dom/resize_observer.dart'; export 'dom/resource_timing.dart'; -export 'dom/sanitizer_api.dart'; -export 'dom/scheduling_apis.dart'; -export 'dom/screen_capture.dart'; export 'dom/screen_orientation.dart'; export 'dom/screen_wake_lock.dart'; -export 'dom/scroll_animations.dart'; -export 'dom/scroll_to_text_fragment.dart'; -export 'dom/secure_payment_confirmation.dart'; export 'dom/selection_api.dart'; -export 'dom/serial.dart'; export 'dom/server_timing.dart'; export 'dom/service_workers.dart'; -export 'dom/shape_detection_api.dart'; -export 'dom/shared_storage.dart'; export 'dom/speech_api.dart'; export 'dom/storage.dart'; -export 'dom/storage_buckets.dart'; export 'dom/streams.dart'; export 'dom/svg.dart'; export 'dom/svg_animations.dart'; -export 'dom/testutils.dart'; -export 'dom/text_detection_api.dart'; export 'dom/touch_events.dart'; -export 'dom/trust_token_api.dart'; -export 'dom/trusted_types.dart'; -export 'dom/turtledove.dart'; -export 'dom/ua_client_hints.dart'; export 'dom/uievents.dart'; export 'dom/url.dart'; -export 'dom/urlpattern.dart'; export 'dom/user_timing.dart'; export 'dom/vibration.dart'; -export 'dom/video_rvfc.dart'; -export 'dom/virtual_keyboard.dart'; -export 'dom/wasm_js_api.dart'; export 'dom/web_animations.dart'; export 'dom/web_animations_2.dart'; -export 'dom/web_app_launch.dart'; -export 'dom/web_bluetooth.dart'; export 'dom/web_locks.dart'; -export 'dom/web_nfc.dart'; -export 'dom/web_otp.dart'; -export 'dom/web_share.dart'; export 'dom/webaudio.dart'; export 'dom/webauthn.dart'; -export 'dom/webcodecs.dart'; -export 'dom/webcodecs_aac_codec_registration.dart'; -export 'dom/webcodecs_av1_codec_registration.dart'; -export 'dom/webcodecs_avc_codec_registration.dart'; -export 'dom/webcodecs_flac_codec_registration.dart'; -export 'dom/webcodecs_hevc_codec_registration.dart'; -export 'dom/webcodecs_opus_codec_registration.dart'; -export 'dom/webcodecs_vp9_codec_registration.dart'; -export 'dom/webcrypto_secure_curves.dart'; export 'dom/webcryptoapi.dart'; export 'dom/webgl1.dart'; export 'dom/webgl2.dart'; -export 'dom/webgl_blend_equation_advanced_coherent.dart'; -export 'dom/webgl_clip_cull_distance.dart'; export 'dom/webgl_color_buffer_float.dart'; export 'dom/webgl_compressed_texture_astc.dart'; -export 'dom/webgl_compressed_texture_etc.dart'; -export 'dom/webgl_compressed_texture_etc1.dart'; -export 'dom/webgl_compressed_texture_pvrtc.dart'; export 'dom/webgl_compressed_texture_s3tc.dart'; export 'dom/webgl_compressed_texture_s3tc_srgb.dart'; export 'dom/webgl_debug_renderer_info.dart'; export 'dom/webgl_debug_shaders.dart'; export 'dom/webgl_depth_texture.dart'; export 'dom/webgl_draw_buffers.dart'; -export 'dom/webgl_draw_instanced_base_vertex_base_instance.dart'; export 'dom/webgl_lose_context.dart'; -export 'dom/webgl_multi_draw.dart'; -export 'dom/webgl_multi_draw_instanced_base_vertex_base_instance.dart'; -export 'dom/webgl_provoking_vertex.dart'; -export 'dom/webgpu.dart'; -export 'dom/webhid.dart'; export 'dom/webidl.dart'; -export 'dom/webmidi.dart'; -export 'dom/webnn.dart'; export 'dom/webrtc.dart'; export 'dom/webrtc_encoded_transform.dart'; -export 'dom/webrtc_ice.dart'; -export 'dom/webrtc_identity.dart'; -export 'dom/webrtc_priority.dart'; export 'dom/webrtc_stats.dart'; export 'dom/websockets.dart'; -export 'dom/webtransport.dart'; -export 'dom/webusb.dart'; export 'dom/webvtt.dart'; -export 'dom/webxr.dart'; -export 'dom/webxr_ar_module.dart'; -export 'dom/webxr_depth_sensing.dart'; -export 'dom/webxr_dom_overlays.dart'; -export 'dom/webxr_hand_input.dart'; -export 'dom/webxr_hit_test.dart'; -export 'dom/webxr_lighting_estimation.dart'; -export 'dom/webxrlayers.dart'; -export 'dom/window_controls_overlay.dart'; -export 'dom/window_management.dart'; export 'dom/xhr.dart'; diff --git a/lib/src/dom/accelerometer.dart b/lib/src/dom/accelerometer.dart deleted file mode 100644 index ccc7ba23..00000000 --- a/lib/src/dom/accelerometer.dart +++ /dev/null @@ -1,97 +0,0 @@ -// Copyright (c) 2024, the Dart project authors. Please see the AUTHORS file -// for details. All rights reserved. Use of this source code is governed by a -// BSD-style license that can be found in the LICENSE file. -// -// API docs from [MDN Web Docs](https://developer.mozilla.org/en-US/docs/Web). -// Attributions and copyright licensing by Mozilla Contributors is licensed -// under [CC-BY-SA 2.5](https://creativecommons.org/licenses/by-sa/2.5/. - -// Generated from Web IDL definitions. - -import 'dart:js_interop'; - -import 'generic_sensor.dart'; - -typedef AccelerometerLocalCoordinateSystem = String; - -/// The **`Accelerometer`** interface of the -/// [Sensor APIs](https://developer.mozilla.org/en-US/docs/Web/API/Sensor_APIs) -/// provides on each reading the acceleration applied to the device along all -/// three axes. -/// -/// To use this sensor, the user must grant permission to the `'accelerometer'`, -/// device sensor through the -/// [Permissions API](https://developer.mozilla.org/en-US/docs/Web/API/Permissions_API). -/// -/// This feature may be blocked by a -/// [Permissions Policy](https://developer.mozilla.org/en-US/docs/Web/HTTP/Permissions_Policy) -/// set on your server. -extension type Accelerometer._(JSObject _) implements Sensor, JSObject { - external factory Accelerometer([AccelerometerSensorOptions options]); - - external num? get x; - external num? get y; - external num? get z; -} -extension type AccelerometerSensorOptions._(JSObject _) - implements SensorOptions, JSObject { - external factory AccelerometerSensorOptions( - {AccelerometerLocalCoordinateSystem referenceFrame}); - - external set referenceFrame(AccelerometerLocalCoordinateSystem value); - external AccelerometerLocalCoordinateSystem get referenceFrame; -} - -/// The **`LinearAccelerationSensor`** interface of the -/// [Sensor APIs](https://developer.mozilla.org/en-US/docs/Web/API/Sensor_APIs) -/// provides on each reading the acceleration applied to the device along all -/// three axes, but without the contribution of gravity. -/// -/// To use this sensor, the user must grant permission to the `'accelerometer'` -/// device sensor through the -/// [Permissions API](https://developer.mozilla.org/en-US/docs/Web/API/Permissions_API). -/// In addition, this feature may be blocked by a -/// [Permissions Policy](https://developer.mozilla.org/en-US/docs/Web/HTTP/Permissions_Policy) -/// set on your server. -extension type LinearAccelerationSensor._(JSObject _) - implements Accelerometer, JSObject { - external factory LinearAccelerationSensor( - [AccelerometerSensorOptions options]); -} - -/// The **`GravitySensor`** interface of the -/// [Sensor APIs](https://developer.mozilla.org/en-US/docs/Web/API/Sensor_APIs) -/// provides on each reading the gravity applied to the device along all three -/// axes. -/// -/// To use this sensor, the user must grant permission to the `'accelerometer'` -/// device sensor through the -/// [Permissions API](https://developer.mozilla.org/en-US/docs/Web/API/Permissions_API). -/// In addition, this feature may be blocked by a -/// [Permissions Policy](https://developer.mozilla.org/en-US/docs/Web/HTTP/Permissions_Policy) -/// set on your server. -extension type GravitySensor._(JSObject _) implements Accelerometer, JSObject { - external factory GravitySensor([AccelerometerSensorOptions options]); -} -extension type AccelerometerReadingValues._(JSObject _) implements JSObject { - external factory AccelerometerReadingValues({ - required num? x, - required num? y, - required num? z, - }); - - external set x(num? value); - external num? get x; - external set y(num? value); - external num? get y; - external set z(num? value); - external num? get z; -} -extension type LinearAccelerationReadingValues._(JSObject _) - implements AccelerometerReadingValues, JSObject { - external factory LinearAccelerationReadingValues(); -} -extension type GravityReadingValues._(JSObject _) - implements AccelerometerReadingValues, JSObject { - external factory GravityReadingValues(); -} diff --git a/lib/src/dom/ambient_light.dart b/lib/src/dom/ambient_light.dart deleted file mode 100644 index 872116bc..00000000 --- a/lib/src/dom/ambient_light.dart +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) 2024, the Dart project authors. Please see the AUTHORS file -// for details. All rights reserved. Use of this source code is governed by a -// BSD-style license that can be found in the LICENSE file. -// -// API docs from [MDN Web Docs](https://developer.mozilla.org/en-US/docs/Web). -// Attributions and copyright licensing by Mozilla Contributors is licensed -// under [CC-BY-SA 2.5](https://creativecommons.org/licenses/by-sa/2.5/. - -// Generated from Web IDL definitions. - -import 'dart:js_interop'; - -import 'generic_sensor.dart'; - -/// The **`AmbientLightSensor`** interface of the -/// [Sensor APIs](https://developer.mozilla.org/en-US/docs/Web/API/Sensor_APIs) -/// returns the current light level or illuminance of the ambient light around -/// the hosting device. -/// -/// To use this sensor, the user must grant permission to the -/// `'ambient-light-sensor'` device sensor through the -/// [Permissions API](https://developer.mozilla.org/en-US/docs/Web/API/Permissions_API). -/// -/// This feature may be blocked by a -/// [Permissions Policy](https://developer.mozilla.org/en-US/docs/Web/HTTP/Permissions_Policy) -/// set on your server. -extension type AmbientLightSensor._(JSObject _) implements Sensor, JSObject { - external factory AmbientLightSensor([SensorOptions sensorOptions]); - - external num? get illuminance; -} -extension type AmbientLightReadingValues._(JSObject _) implements JSObject { - external factory AmbientLightReadingValues({required num? illuminance}); - - external set illuminance(num? value); - external num? get illuminance; -} diff --git a/lib/src/dom/anchors.dart b/lib/src/dom/anchors.dart deleted file mode 100644 index d818662f..00000000 --- a/lib/src/dom/anchors.dart +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) 2024, the Dart project authors. Please see the AUTHORS file -// for details. All rights reserved. Use of this source code is governed by a -// BSD-style license that can be found in the LICENSE file. -// -// API docs from [MDN Web Docs](https://developer.mozilla.org/en-US/docs/Web). -// Attributions and copyright licensing by Mozilla Contributors is licensed -// under [CC-BY-SA 2.5](https://creativecommons.org/licenses/by-sa/2.5/. - -// Generated from Web IDL definitions. - -import 'dart:js_interop'; - -import 'webxr.dart'; - -/// The **`XRAnchor`** interface creates anchors which keep track of the pose -/// that is fixed relative to the real world. With anchors, you can specify -/// poses in the world that need to be updated to correctly reflect the evolving -/// understanding of the world, such that the poses remain aligned with the same -/// place in the physical world. That helps to build an illusion that the placed -/// objects are really present in the user's environment. -extension type XRAnchor._(JSObject _) implements JSObject { - external JSPromise requestPersistentHandle(); - - /// The **`delete()`** method of the [XRAnchor] interface removes an anchor. - /// This can be useful when an application is no longer interested in - /// receiving updates to an anchor. - external void delete(); - external XRSpace get anchorSpace; -} - -/// The **`XRAnchorSet`** interface exposes a collection of anchors. Its -/// instances are returned by [XRFrame.trackedAnchors] and are -/// [`Set`-like objects](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Set#set-like_browser_apis). -extension type XRAnchorSet._(JSObject _) implements JSObject {} diff --git a/lib/src/dom/angle_instanced_arrays.dart b/lib/src/dom/angle_instanced_arrays.dart index 4d8eea53..18b7581d 100644 --- a/lib/src/dom/angle_instanced_arrays.dart +++ b/lib/src/dom/angle_instanced_arrays.dart @@ -8,6 +8,9 @@ // Generated from Web IDL definitions. +@JS() +library; + import 'dart:js_interop'; import 'webgl1.dart'; diff --git a/lib/src/dom/attribution_reporting_api.dart b/lib/src/dom/attribution_reporting_api.dart deleted file mode 100644 index 86fc7cad..00000000 --- a/lib/src/dom/attribution_reporting_api.dart +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) 2024, the Dart project authors. Please see the AUTHORS file -// for details. All rights reserved. Use of this source code is governed by a -// BSD-style license that can be found in the LICENSE file. -// -// API docs from [MDN Web Docs](https://developer.mozilla.org/en-US/docs/Web). -// Attributions and copyright licensing by Mozilla Contributors is licensed -// under [CC-BY-SA 2.5](https://creativecommons.org/licenses/by-sa/2.5/. - -// Generated from Web IDL definitions. - -import 'dart:js_interop'; - -extension type AttributionReportingRequestOptions._(JSObject _) - implements JSObject { - external factory AttributionReportingRequestOptions({ - required bool eventSourceEligible, - required bool triggerEligible, - }); - - external set eventSourceEligible(bool value); - external bool get eventSourceEligible; - external set triggerEligible(bool value); - external bool get triggerEligible; -} diff --git a/lib/src/dom/audio_output.dart b/lib/src/dom/audio_output.dart deleted file mode 100644 index 0f1297e6..00000000 --- a/lib/src/dom/audio_output.dart +++ /dev/null @@ -1,18 +0,0 @@ -// Copyright (c) 2024, the Dart project authors. Please see the AUTHORS file -// for details. All rights reserved. Use of this source code is governed by a -// BSD-style license that can be found in the LICENSE file. -// -// API docs from [MDN Web Docs](https://developer.mozilla.org/en-US/docs/Web). -// Attributions and copyright licensing by Mozilla Contributors is licensed -// under [CC-BY-SA 2.5](https://creativecommons.org/licenses/by-sa/2.5/. - -// Generated from Web IDL definitions. - -import 'dart:js_interop'; - -extension type AudioOutputOptions._(JSObject _) implements JSObject { - external factory AudioOutputOptions({String deviceId}); - - external set deviceId(String value); - external String get deviceId; -} diff --git a/lib/src/dom/audio_session.dart b/lib/src/dom/audio_session.dart deleted file mode 100644 index c2bb89a2..00000000 --- a/lib/src/dom/audio_session.dart +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) 2024, the Dart project authors. Please see the AUTHORS file -// for details. All rights reserved. Use of this source code is governed by a -// BSD-style license that can be found in the LICENSE file. -// -// API docs from [MDN Web Docs](https://developer.mozilla.org/en-US/docs/Web). -// Attributions and copyright licensing by Mozilla Contributors is licensed -// under [CC-BY-SA 2.5](https://creativecommons.org/licenses/by-sa/2.5/. - -// Generated from Web IDL definitions. - -import 'dart:js_interop'; - -import 'dom.dart'; -import 'html.dart'; - -typedef AudioSessionState = String; -typedef AudioSessionType = String; -extension type AudioSession._(JSObject _) implements EventTarget, JSObject { - external set type(AudioSessionType value); - external AudioSessionType get type; - external AudioSessionState get state; - external set onstatechange(EventHandler value); - external EventHandler get onstatechange; -} diff --git a/lib/src/dom/autoplay_detection.dart b/lib/src/dom/autoplay_detection.dart deleted file mode 100644 index 9e429d07..00000000 --- a/lib/src/dom/autoplay_detection.dart +++ /dev/null @@ -1,12 +0,0 @@ -// Copyright (c) 2024, the Dart project authors. Please see the AUTHORS file -// for details. All rights reserved. Use of this source code is governed by a -// BSD-style license that can be found in the LICENSE file. -// -// API docs from [MDN Web Docs](https://developer.mozilla.org/en-US/docs/Web). -// Attributions and copyright licensing by Mozilla Contributors is licensed -// under [CC-BY-SA 2.5](https://creativecommons.org/licenses/by-sa/2.5/. - -// Generated from Web IDL definitions. - -typedef AutoplayPolicy = String; -typedef AutoplayPolicyMediaType = String; diff --git a/lib/src/dom/background_fetch.dart b/lib/src/dom/background_fetch.dart deleted file mode 100644 index 9aaee6d1..00000000 --- a/lib/src/dom/background_fetch.dart +++ /dev/null @@ -1,157 +0,0 @@ -// Copyright (c) 2024, the Dart project authors. Please see the AUTHORS file -// for details. All rights reserved. Use of this source code is governed by a -// BSD-style license that can be found in the LICENSE file. -// -// API docs from [MDN Web Docs](https://developer.mozilla.org/en-US/docs/Web). -// Attributions and copyright licensing by Mozilla Contributors is licensed -// under [CC-BY-SA 2.5](https://creativecommons.org/licenses/by-sa/2.5/. - -// Generated from Web IDL definitions. - -import 'dart:js_interop'; - -import 'dom.dart'; -import 'fetch.dart'; -import 'html.dart'; -import 'service_workers.dart'; - -typedef BackgroundFetchResult = String; -typedef BackgroundFetchFailureReason = String; - -/// The **`BackgroundFetchManager`** interface of the [Background Fetch API] is -/// a map where the keys are background fetch IDs and the values are -/// [BackgroundFetchRegistration] objects. -extension type BackgroundFetchManager._(JSObject _) implements JSObject { - /// The **`fetch()`** method of the [BackgroundFetchManager] interface - /// initiates a background fetch operation, given one or more URLs or - /// [Request] objects. - external JSPromise fetch( - String id, - JSAny requests, [ - BackgroundFetchOptions options, - ]); - - /// The **`get()`** method of the [BackgroundFetchManager] interface returns a - /// `Promise` that resolves with the [BackgroundFetchRegistration] associated - /// with the provided `id` or `undefined` if the `id` is not found. - external JSPromise get(String id); - - /// The **`getIds()`** method of the [BackgroundFetchManager] interface - /// returns the IDs of all registered background fetches. - external JSPromise getIds(); -} -extension type BackgroundFetchUIOptions._(JSObject _) implements JSObject { - external factory BackgroundFetchUIOptions({ - JSArray icons, - String title, - }); - - external set icons(JSArray value); - external JSArray get icons; - external set title(String value); - external String get title; -} -extension type BackgroundFetchOptions._(JSObject _) - implements BackgroundFetchUIOptions, JSObject { - external factory BackgroundFetchOptions({int downloadTotal}); - - external set downloadTotal(int value); - external int get downloadTotal; -} - -/// The **`BackgroundFetchRegistration`** interface of the -/// [Background Fetch API] represents an individual background fetch. -/// -/// A `BackgroundFetchRegistration` instance is returned by the -/// [BackgroundFetchManager.fetch] or [BackgroundFetchManager.get] methods, and -/// therefore there has no constructor. -extension type BackgroundFetchRegistration._(JSObject _) - implements EventTarget, JSObject { - /// The **`abort()`** method of the [BackgroundFetchRegistration] interface - /// aborts an active background fetch. - external JSPromise abort(); - - /// The **`match()`** method of the [BackgroundFetchRegistration] interface - /// returns the first matching [BackgroundFetchRecord]. - external JSPromise match( - RequestInfo request, [ - CacheQueryOptions options, - ]); - - /// The **`matchAll()`** method of the [BackgroundFetchRegistration] interface - /// returns an array of matching [BackgroundFetchRecord] objects. - external JSPromise matchAll([ - RequestInfo request, - CacheQueryOptions options, - ]); - external String get id; - external int get uploadTotal; - external int get uploaded; - external int get downloadTotal; - external int get downloaded; - external BackgroundFetchResult get result; - external BackgroundFetchFailureReason get failureReason; - external bool get recordsAvailable; - external set onprogress(EventHandler value); - external EventHandler get onprogress; -} - -/// The **`BackgroundFetchRecord`** interface of the [Background Fetch API] -/// represents an individual request and response. -/// -/// A `BackgroundFetchRecord` is created by the -/// [BackgroundFetchRegistration.match] method, therefore there is no -/// constructor for this interface. -/// -/// There will be one `BackgroundFetchRecord` for each resource requested by -/// `fetch()`. -extension type BackgroundFetchRecord._(JSObject _) implements JSObject { - external Request get request; - external JSPromise get responseReady; -} - -/// The **`BackgroundFetchEvent`** interface of the [Background Fetch API] is -/// the event type for background fetch events dispatched on the -/// [ServiceWorkerGlobalScope]. -/// -/// It is the event type passed to `onbackgroundfetchabort` and -/// `onbackgroundfetchclick`. -extension type BackgroundFetchEvent._(JSObject _) - implements ExtendableEvent, JSObject { - external factory BackgroundFetchEvent( - String type, - BackgroundFetchEventInit init, - ); - - external BackgroundFetchRegistration get registration; -} -extension type BackgroundFetchEventInit._(JSObject _) - implements ExtendableEventInit, JSObject { - external factory BackgroundFetchEventInit( - {required BackgroundFetchRegistration registration}); - - external set registration(BackgroundFetchRegistration value); - external BackgroundFetchRegistration get registration; -} - -/// The **`BackgroundFetchUpdateUIEvent`** interface of the -/// [Background Fetch API] is an event type for the -/// [ServiceWorkerGlobalScope.backgroundfetchsuccess_event] and -/// [ServiceWorkerGlobalScope.backgroundfetchfail_event] events, and provides a -/// method for updating the title and icon of the app to inform a user of the -/// success or failure of a background fetch. -extension type BackgroundFetchUpdateUIEvent._(JSObject _) - implements BackgroundFetchEvent, JSObject { - external factory BackgroundFetchUpdateUIEvent( - String type, - BackgroundFetchEventInit init, - ); - - /// The **`updateUI()`** method of the [BackgroundFetchUpdateUIEvent] - /// interface updates the title and icon in the user interface to show the - /// status of a background fetch. - /// - /// This method may only be run once, to notify the user on a failed or a - /// successful fetch. - external JSPromise updateUI([BackgroundFetchUIOptions options]); -} diff --git a/lib/src/dom/background_sync.dart b/lib/src/dom/background_sync.dart deleted file mode 100644 index e1aba514..00000000 --- a/lib/src/dom/background_sync.dart +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright (c) 2024, the Dart project authors. Please see the AUTHORS file -// for details. All rights reserved. Use of this source code is governed by a -// BSD-style license that can be found in the LICENSE file. -// -// API docs from [MDN Web Docs](https://developer.mozilla.org/en-US/docs/Web). -// Attributions and copyright licensing by Mozilla Contributors is licensed -// under [CC-BY-SA 2.5](https://creativecommons.org/licenses/by-sa/2.5/. - -// Generated from Web IDL definitions. - -import 'dart:js_interop'; - -import 'service_workers.dart'; - -/// The **`SyncManager`** interface of the -/// [ServiceWorker API](https://developer.mozilla.org/en-US/docs/Web/API/Service_Worker_API) -/// provides an interface for registering and listing sync registrations. -extension type SyncManager._(JSObject _) implements JSObject { - /// The **`SyncManager.register`** method of the [SyncManager] interface - /// registers a synchronization event, triggering a - /// [ServiceWorkerGlobalScope.sync_event] event inside the associated service - /// worker as soon as network connectivity is available. - external JSPromise register(String tag); - - /// The **`SyncManager.getTags`** method of the - /// [SyncManager] interface returns a list of developer-defined identifiers - /// for - /// `SyncManager` registrations. - external JSPromise getTags(); -} - -/// The **`SyncEvent`** interface represents a sync action that is dispatched on -/// the [ServiceWorkerGlobalScope] of a ServiceWorker. -/// -/// This interface inherits from the [ExtendableEvent] interface. -extension type SyncEvent._(JSObject _) implements ExtendableEvent, JSObject { - external factory SyncEvent( - String type, - SyncEventInit init, - ); - - external String get tag; - external bool get lastChance; -} -extension type SyncEventInit._(JSObject _) - implements ExtendableEventInit, JSObject { - external factory SyncEventInit({ - required String tag, - bool lastChance, - }); - - external set tag(String value); - external String get tag; - external set lastChance(bool value); - external bool get lastChance; -} diff --git a/lib/src/dom/battery_status.dart b/lib/src/dom/battery_status.dart deleted file mode 100644 index d2c1dbf9..00000000 --- a/lib/src/dom/battery_status.dart +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) 2024, the Dart project authors. Please see the AUTHORS file -// for details. All rights reserved. Use of this source code is governed by a -// BSD-style license that can be found in the LICENSE file. -// -// API docs from [MDN Web Docs](https://developer.mozilla.org/en-US/docs/Web). -// Attributions and copyright licensing by Mozilla Contributors is licensed -// under [CC-BY-SA 2.5](https://creativecommons.org/licenses/by-sa/2.5/. - -// Generated from Web IDL definitions. - -import 'dart:js_interop'; - -import 'dom.dart'; -import 'html.dart'; - -/// The `BatteryManager` interface of the [Battery Status API] provides -/// information about the system's battery charge level. The -/// [navigator.getBattery] method returns a promise that resolves with a -/// `BatteryManager` interface. -/// -/// Since Chrome 103, the `BatteryManager` interface of [Battery Status API] -/// only expose to secure context. -extension type BatteryManager._(JSObject _) implements EventTarget, JSObject { - external bool get charging; - external num get chargingTime; - external num get dischargingTime; - external num get level; - external set onchargingchange(EventHandler value); - external EventHandler get onchargingchange; - external set onchargingtimechange(EventHandler value); - external EventHandler get onchargingtimechange; - external set ondischargingtimechange(EventHandler value); - external EventHandler get ondischargingtimechange; - external set onlevelchange(EventHandler value); - external EventHandler get onlevelchange; -} diff --git a/lib/src/dom/capture_handle_identity.dart b/lib/src/dom/capture_handle_identity.dart deleted file mode 100644 index 03397570..00000000 --- a/lib/src/dom/capture_handle_identity.dart +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) 2024, the Dart project authors. Please see the AUTHORS file -// for details. All rights reserved. Use of this source code is governed by a -// BSD-style license that can be found in the LICENSE file. -// -// API docs from [MDN Web Docs](https://developer.mozilla.org/en-US/docs/Web). -// Attributions and copyright licensing by Mozilla Contributors is licensed -// under [CC-BY-SA 2.5](https://creativecommons.org/licenses/by-sa/2.5/. - -// Generated from Web IDL definitions. - -import 'dart:js_interop'; - -extension type CaptureHandleConfig._(JSObject _) implements JSObject { - external factory CaptureHandleConfig({ - bool exposeOrigin, - String handle, - JSArray permittedOrigins, - }); - - external set exposeOrigin(bool value); - external bool get exposeOrigin; - external set handle(String value); - external String get handle; - external set permittedOrigins(JSArray value); - external JSArray get permittedOrigins; -} -extension type CaptureHandle._(JSObject _) implements JSObject { - external factory CaptureHandle({ - String origin, - String handle, - }); - - external set origin(String value); - external String get origin; - external set handle(String value); - external String get handle; -} diff --git a/lib/src/dom/captured_mouse_events.dart b/lib/src/dom/captured_mouse_events.dart deleted file mode 100644 index 73432563..00000000 --- a/lib/src/dom/captured_mouse_events.dart +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) 2024, the Dart project authors. Please see the AUTHORS file -// for details. All rights reserved. Use of this source code is governed by a -// BSD-style license that can be found in the LICENSE file. -// -// API docs from [MDN Web Docs](https://developer.mozilla.org/en-US/docs/Web). -// Attributions and copyright licensing by Mozilla Contributors is licensed -// under [CC-BY-SA 2.5](https://creativecommons.org/licenses/by-sa/2.5/. - -// Generated from Web IDL definitions. - -import 'dart:js_interop'; - -import 'dom.dart'; - -extension type CapturedMouseEvent._(JSObject _) implements Event, JSObject { - external factory CapturedMouseEvent( - String type, [ - CapturedMouseEventInit eventInitDict, - ]); - - external int get surfaceX; - external int get surfaceY; -} -extension type CapturedMouseEventInit._(JSObject _) - implements EventInit, JSObject { - external factory CapturedMouseEventInit({ - int surfaceX, - int surfaceY, - }); - - external set surfaceX(int value); - external int get surfaceX; - external set surfaceY(int value); - external int get surfaceY; -} diff --git a/lib/src/dom/clipboard_apis.dart b/lib/src/dom/clipboard_apis.dart index e611f970..3c8df21e 100644 --- a/lib/src/dom/clipboard_apis.dart +++ b/lib/src/dom/clipboard_apis.dart @@ -8,14 +8,18 @@ // Generated from Web IDL definitions. +@JS() +library; + import 'dart:js_interop'; import 'dom.dart'; +import 'fileapi.dart'; import 'html.dart'; import 'permissions.dart'; -typedef ClipboardItemData = JSPromise; -typedef ClipboardItems = JSArray; +typedef ClipboardItemData = JSPromise; +typedef ClipboardItems = JSArray; typedef PresentationStyle = String; extension type ClipboardEventInit._(JSObject _) implements EventInit, JSObject { external factory ClipboardEventInit({DataTransfer? clipboardData}); @@ -51,7 +55,7 @@ extension type ClipboardEvent._(JSObject _) implements Event, JSObject { /// > [Clipboard.writeText] methods of the [Clipboard] interface. extension type ClipboardItem._(JSObject _) implements JSObject { external factory ClipboardItem( - JSAny items, [ + JSObject items, [ ClipboardItemOptions options, ]); @@ -60,9 +64,9 @@ extension type ClipboardItem._(JSObject _) implements JSObject { /// The **`getType()`** method of the [ClipboardItem] interface returns a /// `Promise` that resolves with a [Blob] of the requested or an error if the /// MIME type is not found. - external JSPromise getType(String type); + external JSPromise getType(String type); external PresentationStyle get presentationStyle; - external JSArray get types; + external JSArray get types; } extension type ClipboardItemOptions._(JSObject _) implements JSObject { external factory ClipboardItemOptions({PresentationStyle presentationStyle}); @@ -96,7 +100,8 @@ extension type Clipboard._(JSObject _) implements EventTarget, JSObject { /// [Clipboard.readText], which can only return text). /// Browsers commonly support reading text, HTML, and PNG image data — see /// [browser compatibility](#browser_compatibility) for more information. - external JSPromise read(); + external JSPromise read( + [ClipboardUnsanitizedFormats formats]); /// The **`readText()`** method of the [Clipboard] interface returns a /// `Promise` which fulfils with a copy of the textual contents of the system @@ -105,7 +110,7 @@ extension type Clipboard._(JSObject _) implements EventTarget, JSObject { /// > **Note:** To read non-text contents from the clipboard, use the /// > [Clipboard.read] method instead. /// > You can write text to the clipboard using [Clipboard.writeText]. - external JSPromise readText(); + external JSPromise readText(); /// The **`write()`** method of the [Clipboard] interface writes arbitrary /// data to the clipboard, such as images, fulfilling the returned `Promise` @@ -116,12 +121,18 @@ extension type Clipboard._(JSObject _) implements EventTarget, JSObject { /// [Clipboard.writeText], which can only write text). /// Browsers commonly support writing text, HTML, and PNG image data — see /// [browser compatibility](#browser_compatibility) for more information. - external JSPromise write(ClipboardItems data); + external JSPromise write(ClipboardItems data); /// The **`writeText()`** method of the [Clipboard] interface writes the /// specified text to the system clipboard, returning a `Promise` that is /// resolved once the system clipboard has been updated. - external JSPromise writeText(String data); + external JSPromise writeText(String data); +} +extension type ClipboardUnsanitizedFormats._(JSObject _) implements JSObject { + external factory ClipboardUnsanitizedFormats({JSArray unsanitized}); + + external set unsanitized(JSArray value); + external JSArray get unsanitized; } extension type ClipboardPermissionDescriptor._(JSObject _) implements PermissionDescriptor, JSObject { diff --git a/lib/src/dom/compression.dart b/lib/src/dom/compression.dart index c8ddcf2c..6653a501 100644 --- a/lib/src/dom/compression.dart +++ b/lib/src/dom/compression.dart @@ -8,6 +8,9 @@ // Generated from Web IDL definitions. +@JS() +library; + import 'dart:js_interop'; import 'streams.dart'; diff --git a/lib/src/dom/compute_pressure.dart b/lib/src/dom/compute_pressure.dart deleted file mode 100644 index f68ec7cf..00000000 --- a/lib/src/dom/compute_pressure.dart +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) 2024, the Dart project authors. Please see the AUTHORS file -// for details. All rights reserved. Use of this source code is governed by a -// BSD-style license that can be found in the LICENSE file. -// -// API docs from [MDN Web Docs](https://developer.mozilla.org/en-US/docs/Web). -// Attributions and copyright licensing by Mozilla Contributors is licensed -// under [CC-BY-SA 2.5](https://creativecommons.org/licenses/by-sa/2.5/. - -// Generated from Web IDL definitions. - -import 'dart:js_interop'; - -import 'hr_time.dart'; - -typedef PressureUpdateCallback = JSFunction; -typedef PressureSource = String; -typedef PressureState = String; -extension type PressureObserver._(JSObject _) implements JSObject { - external factory PressureObserver( - PressureUpdateCallback callback, [ - PressureObserverOptions options, - ]); - - external static JSArray get supportedSources; - external JSPromise observe(PressureSource source); - external void unobserve(PressureSource source); - external void disconnect(); - external JSArray takeRecords(); -} -extension type PressureRecord._(JSObject _) implements JSObject { - external JSObject toJSON(); - external PressureSource get source; - external PressureState get state; - external DOMHighResTimeStamp get time; -} -extension type PressureObserverOptions._(JSObject _) implements JSObject { - external factory PressureObserverOptions({num sampleRate}); - - external set sampleRate(num value); - external num get sampleRate; -} diff --git a/lib/src/dom/console.dart b/lib/src/dom/console.dart index e9656423..086c54a4 100644 --- a/lib/src/dom/console.dart +++ b/lib/src/dom/console.dart @@ -8,6 +8,9 @@ // Generated from Web IDL definitions. +@JS() +library; + import 'dart:js_interop'; @JS() @@ -50,7 +53,7 @@ extension type $Console._(JSObject _) implements JSObject { external void log(JSAny? data); external void table([ JSAny? tabularData, - JSArray properties, + JSArray properties, ]); external void trace(JSAny? data); external void warn(JSAny? data); diff --git a/lib/src/dom/contact_picker.dart b/lib/src/dom/contact_picker.dart deleted file mode 100644 index b1be67e1..00000000 --- a/lib/src/dom/contact_picker.dart +++ /dev/null @@ -1,88 +0,0 @@ -// Copyright (c) 2024, the Dart project authors. Please see the AUTHORS file -// for details. All rights reserved. Use of this source code is governed by a -// BSD-style license that can be found in the LICENSE file. -// -// API docs from [MDN Web Docs](https://developer.mozilla.org/en-US/docs/Web). -// Attributions and copyright licensing by Mozilla Contributors is licensed -// under [CC-BY-SA 2.5](https://creativecommons.org/licenses/by-sa/2.5/. - -// Generated from Web IDL definitions. - -import 'dart:js_interop'; - -typedef ContactProperty = String; - -/// The **`ContactAddress`** interface of the [contact_picker_api] represents a -/// physical address. Instances of this interface are retrieved from the -/// `address` property of the objects returned by -/// [ContactsManager.getProperties]. -/// -/// It may be useful to refer to the Universal Postal Union website's -/// [Addressing S42 standard](https://www.upu.int/en/Postal-Solutions/Programmes-Services/Addressing-Solutions#addressing-s42-standard) -/// materials, which provide information about international standards for -/// postal addresses. -extension type ContactAddress._(JSObject _) implements JSObject { - external JSObject toJSON(); - external String get city; - external String get country; - external String get dependentLocality; - external String get organization; - external String get phone; - external String get postalCode; - external String get recipient; - external String get region; - external String get sortingCode; - external JSArray get addressLine; -} -extension type ContactInfo._(JSObject _) implements JSObject { - external factory ContactInfo({ - JSArray address, - JSArray email, - JSArray icon, - JSArray name, - JSArray tel, - }); - - external set address(JSArray value); - external JSArray get address; - external set email(JSArray value); - external JSArray get email; - external set icon(JSArray value); - external JSArray get icon; - external set name(JSArray value); - external JSArray get name; - external set tel(JSArray value); - external JSArray get tel; -} -extension type ContactsSelectOptions._(JSObject _) implements JSObject { - external factory ContactsSelectOptions({bool multiple}); - - external set multiple(bool value); - external bool get multiple; -} - -/// The **`ContactsManager`** interface of the [Contact Picker API] allows users -/// to select entries from their contact list and share limited details of the -/// selected entries with a website or application. -/// -/// The `ContactsManager` is available through the global [navigator.contacts] -/// property. -extension type ContactsManager._(JSObject _) implements JSObject { - /// The **`getProperties()`** method of the - /// [ContactsManager] interface returns a `Promise` which resolves - /// with an `Array` of `strings` indicating which contact - /// properties are available. - external JSPromise getProperties(); - - /// The **`select()`** method of the - /// [ContactsManager] interface returns a `Promise` which, when - /// resolved, presents the user with a contact picker which allows them to - /// select contact(s) - /// they wish to share. This method requires a user gesture for the `Promise` - /// to - /// resolve. - external JSPromise select( - JSArray properties, [ - ContactsSelectOptions options, - ]); -} diff --git a/lib/src/dom/content_index.dart b/lib/src/dom/content_index.dart deleted file mode 100644 index 18f6bf32..00000000 --- a/lib/src/dom/content_index.dart +++ /dev/null @@ -1,93 +0,0 @@ -// Copyright (c) 2024, the Dart project authors. Please see the AUTHORS file -// for details. All rights reserved. Use of this source code is governed by a -// BSD-style license that can be found in the LICENSE file. -// -// API docs from [MDN Web Docs](https://developer.mozilla.org/en-US/docs/Web). -// Attributions and copyright licensing by Mozilla Contributors is licensed -// under [CC-BY-SA 2.5](https://creativecommons.org/licenses/by-sa/2.5/. - -// Generated from Web IDL definitions. - -import 'dart:js_interop'; - -import 'service_workers.dart'; - -typedef ContentCategory = String; -extension type ContentDescription._(JSObject _) implements JSObject { - external factory ContentDescription({ - required String id, - required String title, - required String description, - ContentCategory category, - JSArray icons, - required String url, - }); - - external set id(String value); - external String get id; - external set title(String value); - external String get title; - external set description(String value); - external String get description; - external set category(ContentCategory value); - external ContentCategory get category; - external set icons(JSArray value); - external JSArray get icons; - external set url(String value); - external String get url; -} - -/// The **`ContentIndex`** interface of the -/// [Content Index API](https://developer.mozilla.org/en-US/docs/Web/API/Content_Index_API) -/// allows developers to register their offline enabled content with the -/// browser. -extension type ContentIndex._(JSObject _) implements JSObject { - /// The **`add()`** method of the - /// [ContentIndex] interface registers an item with the - /// [content index](https://developer.mozilla.org/en-US/docs/Web/API/Content_Index_API). - external JSPromise add(ContentDescription description); - - /// The **`delete()`** method of the - /// [ContentIndex] interface unregisters an item from the currently indexed - /// content. - /// - /// > **Note:** Calling `delete()` only affects the index. It does not delete - /// > anything - /// > from the [Cache]. - external JSPromise delete(String id); - - /// The **`getAll()`** method of the - /// [ContentIndex] interface returns a `Promise` that resolves with - /// an iterable list of content index entries. - external JSPromise getAll(); -} -extension type ContentIndexEventInit._(JSObject _) - implements ExtendableEventInit, JSObject { - external factory ContentIndexEventInit({required String id}); - - external set id(String value); - external String get id; -} - -/// The **`ContentIndexEvent`** interface of the -/// [content index](https://developer.mozilla.org/en-US/docs/Web/API/Content_Index_API) -/// defines the object used to represent the -/// [ServiceWorkerGlobalScope.contentdelete_event] event. -/// -/// This event is sent to the -/// [global scope](https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorkerGlobalScope) -/// of a [ServiceWorker]. It contains the id of the indexed content to be -/// removed. -/// -/// The [ServiceWorkerGlobalScope.contentdelete_event] event is only fired when -/// the deletion happens due to interaction with the browser's built-in user -/// interface. It is not fired when the [ContentIndex.delete] method is called. -extension type ContentIndexEvent._(JSObject _) - implements ExtendableEvent, JSObject { - external factory ContentIndexEvent( - String type, - ContentIndexEventInit init, - ); - - external String get id; -} diff --git a/lib/src/dom/cookie_store.dart b/lib/src/dom/cookie_store.dart deleted file mode 100644 index a376bafb..00000000 --- a/lib/src/dom/cookie_store.dart +++ /dev/null @@ -1,242 +0,0 @@ -// Copyright (c) 2024, the Dart project authors. Please see the AUTHORS file -// for details. All rights reserved. Use of this source code is governed by a -// BSD-style license that can be found in the LICENSE file. -// -// API docs from [MDN Web Docs](https://developer.mozilla.org/en-US/docs/Web). -// Attributions and copyright licensing by Mozilla Contributors is licensed -// under [CC-BY-SA 2.5](https://creativecommons.org/licenses/by-sa/2.5/. - -// Generated from Web IDL definitions. - -import 'dart:js_interop'; - -import 'dom.dart'; -import 'hr_time.dart'; -import 'html.dart'; -import 'service_workers.dart'; - -typedef CookieList = JSArray; -typedef CookieSameSite = String; - -/// The **`CookieStore`** interface of the [Cookie Store API] provides methods -/// for getting and setting cookies asynchronously from either a page or a -/// service worker. -/// -/// The `CookieStore` is accessed via attributes in the global scope in a -/// [Window] or [ServiceWorkerGlobalScope] context. Therefore there is no -/// constructor. -extension type CookieStore._(JSObject _) implements EventTarget, JSObject { - /// The **`get()`** method of the [CookieStore] interface returns a single - /// cookie with the given name or options object. The method will return the - /// first matching cookie for the passed parameters. - external JSPromise get([JSAny nameOrOptions]); - - /// The **`getAll()`** method of the [CookieStore] interface returns a list of - /// cookies that match the name or options passed to it. Passing no parameters - /// will return all cookies for the current context. - external JSPromise getAll([JSAny nameOrOptions]); - - /// The **`set()`** method of the [CookieStore] interface sets a cookie with - /// the given name and value or options object. - external JSPromise set( - JSAny nameOrOptions, [ - String value, - ]); - - /// The **`delete()`** method of the [CookieStore] interface deletes a cookie - /// with the given name or options object. The `delete()` method expires the - /// cookie by changing the date to one in the past. - external JSPromise delete(JSAny nameOrOptions); - external set onchange(EventHandler value); - external EventHandler get onchange; -} -extension type CookieStoreGetOptions._(JSObject _) implements JSObject { - external factory CookieStoreGetOptions({ - String name, - String url, - }); - - external set name(String value); - external String get name; - external set url(String value); - external String get url; -} -extension type CookieInit._(JSObject _) implements JSObject { - external factory CookieInit({ - required String name, - required String value, - DOMHighResTimeStamp? expires, - String? domain, - String path, - CookieSameSite sameSite, - bool partitioned, - }); - - external set name(String value); - external String get name; - external set value(String value); - external String get value; - external set expires(DOMHighResTimeStamp? value); - external DOMHighResTimeStamp? get expires; - external set domain(String? value); - external String? get domain; - external set path(String value); - external String get path; - external set sameSite(CookieSameSite value); - external CookieSameSite get sameSite; - external set partitioned(bool value); - external bool get partitioned; -} -extension type CookieStoreDeleteOptions._(JSObject _) implements JSObject { - external factory CookieStoreDeleteOptions({ - required String name, - String? domain, - String path, - bool partitioned, - }); - - external set name(String value); - external String get name; - external set domain(String? value); - external String? get domain; - external set path(String value); - external String get path; - external set partitioned(bool value); - external bool get partitioned; -} -extension type CookieListItem._(JSObject _) implements JSObject { - external factory CookieListItem({ - String name, - String value, - String? domain, - String path, - DOMHighResTimeStamp? expires, - bool secure, - CookieSameSite sameSite, - bool partitioned, - }); - - external set name(String value); - external String get name; - external set value(String value); - external String get value; - external set domain(String? value); - external String? get domain; - external set path(String value); - external String get path; - external set expires(DOMHighResTimeStamp? value); - external DOMHighResTimeStamp? get expires; - external set secure(bool value); - external bool get secure; - external set sameSite(CookieSameSite value); - external CookieSameSite get sameSite; - external set partitioned(bool value); - external bool get partitioned; -} - -/// The **`CookieStoreManager`** interface of the [Cookie Store API] allows -/// service workers to subscribe to cookie change events. Call -/// [CookieStoreManager.subscribe] on a particular service worker registration -/// to receive change events. -/// -/// A `CookieStoreManager` has an associated [ServiceWorkerRegistration]. Each -/// service worker registration has a cookie change subscription list, which is -/// a list of cookie change subscriptions each containing a name and URL. The -/// methods in this interface allow the service worker to add and remove -/// subscriptions from this list, and to get a list of all subscriptions. -/// -/// To get a `CookieStoreManager`, call [ServiceWorkerRegistration.cookies]. -extension type CookieStoreManager._(JSObject _) implements JSObject { - /// The **`subscribe()`** method of the [CookieStoreManager] interface - /// subscribes a [ServiceWorkerRegistration] to cookie change events. - external JSPromise subscribe(JSArray subscriptions); - - /// The **`getSubscriptions()`** method of the [CookieStoreManager] interface - /// returns a list of all the cookie change subscriptions for this - /// [ServiceWorkerRegistration]. - external JSPromise getSubscriptions(); - - /// The **`unsubscribe()`** method of the [CookieStoreManager] interface stops - /// the [ServiceWorkerRegistration] from receiving previously subscribed - /// events. - external JSPromise unsubscribe(JSArray subscriptions); -} - -/// The **`CookieChangeEvent`** interface of the [Cookie Store API] is the event -/// type of the [CookieStore/change_event] event fired at a [CookieStore] when -/// any cookie changes occur. A cookie change consists of a cookie and a type -/// (either "changed" or "deleted"). -/// -/// Cookie changes that will cause the `CookieChangeEvent` to be dispatched are: -/// -/// - A cookie is newly created and not immediately removed. In this case `type` -/// is "changed". -/// - A cookie is newly created and immediately removed. In this case `type` is -/// "deleted". -/// - A cookie is removed. In this case `type` is "deleted". -/// -/// > **Note:** A cookie that is replaced due to the insertion of another cookie -/// > with the same name, domain, and path, is ignored and does not trigger a -/// > change event. -extension type CookieChangeEvent._(JSObject _) implements Event, JSObject { - external factory CookieChangeEvent( - String type, [ - CookieChangeEventInit eventInitDict, - ]); - - external JSArray get changed; - external JSArray get deleted; -} -extension type CookieChangeEventInit._(JSObject _) - implements EventInit, JSObject { - external factory CookieChangeEventInit({ - CookieList changed, - CookieList deleted, - }); - - external set changed(CookieList value); - external CookieList get changed; - external set deleted(CookieList value); - external CookieList get deleted; -} - -/// The **`ExtendableCookieChangeEvent`** interface of the [Cookie Store API] is -/// the event type passed to [ServiceWorkerGlobalScope/cookiechange_event] event -/// fired at the [ServiceWorkerGlobalScope] when any cookie changes occur which -/// match the service worker's cookie change subscription list. A cookie change -/// event consists of a cookie and a type. (either "changed" or "deleted") -/// -/// Cookie changes that cause the `ExtendableCookieChangeEvent` to be dispatched -/// are: -/// -/// - A cookie is newly created and not immediately removed. In this case `type` -/// is "changed". -/// - A cookie is newly created and immediately removed. In this case `type` is -/// "deleted" -/// - A cookie is removed. In this case `type` is "deleted". -/// -/// > **Note:** A cookie that is replaced due to the insertion of another cookie -/// > with the same name, domain, and path, is ignored and does not trigger a -/// > change event. -extension type ExtendableCookieChangeEvent._(JSObject _) - implements ExtendableEvent, JSObject { - external factory ExtendableCookieChangeEvent( - String type, [ - ExtendableCookieChangeEventInit eventInitDict, - ]); - - external JSArray get changed; - external JSArray get deleted; -} -extension type ExtendableCookieChangeEventInit._(JSObject _) - implements ExtendableEventInit, JSObject { - external factory ExtendableCookieChangeEventInit({ - CookieList changed, - CookieList deleted, - }); - - external set changed(CookieList value); - external CookieList get changed; - external set deleted(CookieList value); - external CookieList get deleted; -} diff --git a/lib/src/dom/crash_reporting.dart b/lib/src/dom/crash_reporting.dart deleted file mode 100644 index f30406a5..00000000 --- a/lib/src/dom/crash_reporting.dart +++ /dev/null @@ -1,18 +0,0 @@ -// Copyright (c) 2024, the Dart project authors. Please see the AUTHORS file -// for details. All rights reserved. Use of this source code is governed by a -// BSD-style license that can be found in the LICENSE file. -// -// API docs from [MDN Web Docs](https://developer.mozilla.org/en-US/docs/Web). -// Attributions and copyright licensing by Mozilla Contributors is licensed -// under [CC-BY-SA 2.5](https://creativecommons.org/licenses/by-sa/2.5/. - -// Generated from Web IDL definitions. - -import 'dart:js_interop'; - -import 'reporting.dart'; - -extension type CrashReportBody._(JSObject _) implements ReportBody, JSObject { - external JSObject toJSON(); - external String? get reason; -} diff --git a/lib/src/dom/credential_management.dart b/lib/src/dom/credential_management.dart index 40391a5a..e6f1b30d 100644 --- a/lib/src/dom/credential_management.dart +++ b/lib/src/dom/credential_management.dart @@ -8,11 +8,12 @@ // Generated from Web IDL definitions. +@JS() +library; + import 'dart:js_interop'; import 'dom.dart'; -import 'fedcm.dart'; -import 'web_otp.dart'; import 'webauthn.dart'; typedef PasswordCredentialInit = JSObject; @@ -30,7 +31,7 @@ typedef CredentialMediationRequirement = String; /// - [PasswordCredential] /// - [PublicKeyCredential] extension type Credential._(JSObject _) implements JSObject { - external static JSPromise isConditionalMediationAvailable(); + external static JSPromise isConditionalMediationAvailable(); external String get id; external String get type; } @@ -67,7 +68,7 @@ extension type CredentialsContainer._(JSObject _) implements JSObject { /// general method call structure and parameters that apply to all the /// different APIs. After that, it is split into separate sections providing /// parameters, return values, and examples specific to each API. - external JSPromise get([CredentialRequestOptions options]); + external JSPromise get([CredentialRequestOptions options]); /// The **`store()`** method of the /// [CredentialsContainer] stores a set of credentials for the user inside a @@ -76,7 +77,7 @@ extension type CredentialsContainer._(JSObject _) implements JSObject { /// > **Note:** This method is restricted to top-level contexts. Calls to it /// > within an /// > `