diff --git a/web/lib/src/dom.dart b/web/lib/src/dom.dart index f7888570..f6a6ce22 100644 --- a/web/lib/src/dom.dart +++ b/web/lib/src/dom.dart @@ -10,7 +10,7 @@ export 'dom/battery_status.dart'; export 'dom/clipboard_apis.dart'; export 'dom/compression.dart'; export 'dom/console.dart'; -export 'dom/cookie_store.dart'; +export 'dom/cookiestore.dart'; export 'dom/credential_management.dart'; export 'dom/csp.dart'; export 'dom/css_animations.dart'; @@ -33,12 +33,10 @@ 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/digital_credentials.dart'; export 'dom/dom.dart'; -export 'dom/dom_parsing.dart'; export 'dom/encoding.dart'; export 'dom/encrypted_media.dart'; export 'dom/entries_api.dart'; @@ -75,6 +73,7 @@ export 'dom/indexeddb.dart'; export 'dom/intersection_observer.dart'; export 'dom/khr_parallel_shader_compile.dart'; export 'dom/largest_contentful_paint.dart'; +export 'dom/local_network_access.dart'; export 'dom/mathml_core.dart'; export 'dom/media_capabilities.dart'; export 'dom/media_playback_quality.dart'; @@ -107,7 +106,6 @@ export 'dom/permissions.dart'; export 'dom/picture_in_picture.dart'; export 'dom/pointerevents.dart'; export 'dom/pointerlock.dart'; -export 'dom/private_network_access.dart'; export 'dom/push_api.dart'; export 'dom/referrer_policy.dart'; export 'dom/remote_playback.dart'; @@ -130,6 +128,7 @@ export 'dom/storage.dart'; export 'dom/streams.dart'; export 'dom/svg.dart'; export 'dom/svg_animations.dart'; +export 'dom/svg_paths.dart'; export 'dom/touch_events.dart'; export 'dom/trust_token_api.dart'; export 'dom/trusted_types.dart'; @@ -155,7 +154,8 @@ 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/webcryptoapi.dart'; +export 'dom/webcrypto.dart'; +export 'dom/webcrypto_modern_algos.dart'; export 'dom/webgl1.dart'; export 'dom/webgl2.dart'; export 'dom/webgl_color_buffer_float.dart'; diff --git a/web/lib/src/dom/cookie_store.dart b/web/lib/src/dom/cookiestore.dart similarity index 94% rename from web/lib/src/dom/cookie_store.dart rename to web/lib/src/dom/cookiestore.dart index eea060be..4b7c4830 100644 --- a/web/lib/src/dom/cookie_store.dart +++ b/web/lib/src/dom/cookiestore.dart @@ -128,30 +128,12 @@ 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 String get name; external set name(String value); external String get value; external set value(String value); - external String? get domain; - external set domain(String? value); - external String get path; - external set path(String value); - external double? get expires; - external set expires(DOMHighResTimeStamp? value); - external bool get secure; - external set secure(bool value); - external CookieSameSite get sameSite; - external set sameSite(CookieSameSite value); - external bool get partitioned; - external set partitioned(bool value); } /// @AvailableInWorkers("window_and_service") diff --git a/web/lib/src/dom/credential_management.dart b/web/lib/src/dom/credential_management.dart index ad1708a4..413491ba 100644 --- a/web/lib/src/dom/credential_management.dart +++ b/web/lib/src/dom/credential_management.dart @@ -182,6 +182,7 @@ extension type CredentialCreationOptions._(JSObject _) implements JSObject { AbortSignal signal, PasswordCredentialInit password, FederatedCredentialInit federated, + DigitalCredentialCreationOptions digital, PublicKeyCredentialCreationOptions publicKey, }); @@ -193,6 +194,8 @@ extension type CredentialCreationOptions._(JSObject _) implements JSObject { external set password(PasswordCredentialInit value); external FederatedCredentialInit get federated; external set federated(FederatedCredentialInit value); + external DigitalCredentialCreationOptions get digital; + external set digital(DigitalCredentialCreationOptions value); external PublicKeyCredentialCreationOptions get publicKey; external set publicKey(PublicKeyCredentialCreationOptions value); } diff --git a/web/lib/src/dom/csp.dart b/web/lib/src/dom/csp.dart index 17f307c4..d695a9b6 100644 --- a/web/lib/src/dom/csp.dart +++ b/web/lib/src/dom/csp.dart @@ -16,209 +16,9 @@ library; import 'dart:js_interop'; import 'dom.dart'; -import 'reporting.dart'; typedef SecurityPolicyViolationEventDisposition = String; -/// The `CSPViolationReportBody` interface is an extension of the -/// [Reporting API](https://developer.mozilla.org/en-US/docs/Web/API/Reporting_API) -/// that represents the body of a Content Security Policy (CSP) violation -/// report. -/// -/// CSP violations are thrown when the webpage attempts to load a resource that -/// violates the policy set by the HTTP header. -/// -/// CSP violation reports are returned in the -/// [reports](https://developer.mozilla.org/en-US/docs/Web/API/ReportingObserver/ReportingObserver#reports) -/// parameter of [ReportingObserver] callbacks that have a `type` of -/// `"csp-violation"`. -/// The `body` property of those reports is an instance of -/// `CSPViolationReportBody`. -/// -/// CSP violation reports may also be sent as JSON objects to the endpoint -/// specified in the -/// [`report-to`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy/report-to) -/// policy directive of the header. -/// These reports similarly have a `type` of `"csp-violation"`, and a `body` -/// property containing a serialization of an instance of this interface. -/// -/// > [!NOTE] -/// > CSP violation reports sent by the Reporting API, when an endpoint is -/// > specified using the CSP -/// > [`report-to`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy/report-to) -/// > directive, are similar (but not identical) to the "CSP report" -/// > [JSON objects](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy/report-uri#violation_report_syntax) -/// > sent when endpoints are specified using the -/// > [`report-uri`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy/report-uri) -/// > directive. -/// > The Reporting API and `report-to` directive are intended to replace the -/// > older report format and the `report-uri` directive. -/// -/// --- -/// -/// API documentation sourced from -/// [MDN Web Docs](https://developer.mozilla.org/en-US/docs/Web/API/CSPViolationReportBody). -extension type CSPViolationReportBody._(JSObject _) - implements ReportBody, JSObject { - /// The **`toJSON()`** method of the [CSPViolationReportBody] interface is a - /// _serializer_, which returns a JSON representation of the - /// `CSPViolationReportBody` object. - /// - /// The existence of a `toJSON()` method allows `CSPViolationReportBody` - /// objects to be converted to a string using the `JSON.stringify()` method. - /// - /// This is used by the reporting API when creating a serialized version of a - /// violation report to send to a reporting endpoint. - external JSObject toJSON(); - - /// The **`documentURL`** read-only property of the [CSPViolationReportBody] - /// interface is a string that represents the URL of the document or worker - /// that violated the [Content Security Policy - /// (CSP)](https://developer.mozilla.org/en-US/docs/Web/HTTP/CSP). - external String get documentURL; - - /// The **`referrer`** read-only property of the [CSPViolationReportBody] - /// interface is a string that represents the URL of the referring page of the - /// resource who's [Content Security Policy - /// (CSP)](https://developer.mozilla.org/en-US/docs/Web/HTTP/CSP) was - /// violated. - /// - /// The referrer is the page that caused the page with the CSP violation to be - /// loaded. For example, if we followed a link to a page with a CSP violation, - /// the `referrer` is the page that we navigated from. - external String? get referrer; - - /// The **`blockedURL`** read-only property of the [CSPViolationReportBody] - /// interface is a string value that represents the resource that was blocked - /// because it violates a [Content Security Policy - /// (CSP)](https://developer.mozilla.org/en-US/docs/Web/HTTP/CSP). - external String? get blockedURL; - - /// The **`effectiveDirective`** read-only property of the - /// [CSPViolationReportBody] interface is a string that represents the - /// effective [Content Security Policy - /// (CSP)](https://developer.mozilla.org/en-US/docs/Web/HTTP/CSP) directive - /// that was violated. - /// - /// Note that this contains the specific directive that was effectively - /// violated, such as - /// [`script-src-elem`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy/script-src-elem) - /// for violations related to script elements, and not the policy that was - /// specified, which may have been the (more general) - /// [`default-src`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy/default-src). - external String get effectiveDirective; - - /// The **`originalPolicy`** read-only property of the - /// [CSPViolationReportBody] interface is a string that represents the - /// [Content Security Policy - /// (CSP)](https://developer.mozilla.org/en-US/docs/Web/HTTP/CSP) whose - /// enforcement uncovered the violation. - /// - /// This is the string in the HTTP response header that contains the list of - /// [directives](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy#directives) - /// and their values that make the CSP policy. - /// Note that differs from the [CSPViolationReportBody.effectiveDirective], - /// which is the specific directive that is effectively being violated (and - /// which might not be explicitly listed in the policy if `default-src` is - /// used). - external String get originalPolicy; - - /// The **`sourceFile`** read-only property of the [CSPViolationReportBody] - /// interface indicates the URL of the source file that violated the [Content - /// Security Policy - /// (CSP)](https://developer.mozilla.org/en-US/docs/Web/HTTP/CSP). - /// - /// For a violation triggered by the use of an inline script, `sourceFile` is - /// the URL of the current document. - /// Similarly, if a document successfully loads a script that then violates - /// the document CSP, the `sourceFile` is the URL of the script. - /// - /// Note however that if a document with a CSP that blocks external resources - /// attempts to load an external resource, `sourceFile` will be `null`. - /// This is because the browser extracts the value from _the global object_ of - /// the file that triggered the violation. - /// Because of the CSP restriction the external resource is never loaded, and - /// therefore has no corresponding global object. - /// - /// This property is most useful alongside [CSPViolationReportBody.lineNumber] - /// and [CSPViolationReportBody.columnNumber], which provide the location - /// within the file that resulted in a violation. - external String? get sourceFile; - - /// The **`sample`** read-only property of the [CSPViolationReportBody] - /// interface is a string that contains a part of the resource that violated - /// the [Content Security Policy - /// (CSP)](https://developer.mozilla.org/en-US/docs/Web/HTTP/CSP). - /// - /// This sample is usually the first 40 characters of the inline script, event - /// handler, or style that violated a CSP restriction. - /// If not populated it is the empty string `""`. - /// - /// Note that this is only populated when attempting to load _inline_ scripts, - /// event handlers, or styles that violate CSP - /// [`script-src*`](/en-US/docs/Web/HTTP/Headers/Content-Security-Policy#script-src) - /// and - /// [`style-src*`](/en-US/docs/Web/HTTP/Headers/Content-Security-Policy#style-src) - /// rules — external resources that violate the CSP will not generate a - /// sample. - /// In addition, a sample is only included if the `Content-Security-Policy` - /// directive that was violated also contains the - /// [`'report-sample'`](/en-US/docs/Web/HTTP/Headers/Content-Security-Policy#report-sample) - /// keyword. - /// - /// > [!NOTE] Violation reports should be considered attacker-controlled data. - /// > The content of this field _in particular_ should be sanitized before - /// > storing or rendering. - external String? get sample; - - /// The **`disposition`** read-only property of the [CSPViolationReportBody] - /// interface indicates whether the user agent is configured to enforce - /// [Content Security Policy - /// (CSP)](https://developer.mozilla.org/en-US/docs/Web/HTTP/CSP) violations - /// or only report them. - external SecurityPolicyViolationEventDisposition get disposition; - - /// The **`statusCode`** read-only property of the [CSPViolationReportBody] - /// interface is a number representing the - /// [HTTP status code](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status) - /// of the response to the request that triggered a [Content Security Policy - /// (CSP)](https://developer.mozilla.org/en-US/docs/Web/HTTP/CSP) violation - /// (when loading a window or worker). - external int get statusCode; - - /// The **`lineNumber`** read-only property of the [CSPViolationReportBody] - /// interface indicates the line number in the source file that triggered the - /// [Content Security Policy - /// (CSP)](https://developer.mozilla.org/en-US/docs/Web/HTTP/CSP) violation. - /// - /// Note that the browser extracts the value from _the global object_ of the - /// file that triggered the violation. - /// If the resource that triggers the CSP violation is not loaded, the value - /// will be `null`. - /// See [CSPViolationReportBody.sourceFile] for more information. - /// - /// This property is most useful alongside [CSPViolationReportBody.sourceFile] - /// and [CSPViolationReportBody.columnNumber], as it provides the location of - /// the line in that file and the column that resulted in a violation. - external int? get lineNumber; - - /// The **`columnNumber`** read-only property of the [CSPViolationReportBody] - /// interface indicates the column number in the source file that triggered - /// the [Content Security Policy - /// (CSP)](https://developer.mozilla.org/en-US/docs/Web/HTTP/CSP) violation. - /// - /// Note that the browser extracts the value from _the global object_ of the - /// file that triggered the violation. - /// If the resource that triggers the CSP violation is not loaded, the value - /// will be `null`. - /// See [CSPViolationReportBody.sourceFile] for more information. - /// - /// This property is most useful alongside [CSPViolationReportBody.sourceFile] - /// and [CSPViolationReportBody.lineNumber], as it provides the location of - /// the column in that file and line that resulted in a violation. - external int? get columnNumber; -} - /// The **`SecurityPolicyViolationEvent`** interface inherits from [Event], and /// represents the event object of a `securitypolicyviolation` event sent on an /// [Element.securitypolicyviolation_event], diff --git a/web/lib/src/dom/css_view_transitions.dart b/web/lib/src/dom/css_view_transitions.dart index 6d29c6de..a2629bb2 100644 --- a/web/lib/src/dom/css_view_transitions.dart +++ b/web/lib/src/dom/css_view_transitions.dart @@ -15,9 +15,25 @@ library; import 'dart:js_interop'; -import 'css_view_transitions_2.dart'; +import 'cssom.dart'; typedef ViewTransitionUpdateCallback = JSFunction; +extension type CSSViewTransitionRule._(JSObject _) + implements CSSRule, JSObject { + external String get navigation; + external JSArray get types; +} +extension type StartViewTransitionOptions._(JSObject _) implements JSObject { + external factory StartViewTransitionOptions({ + ViewTransitionUpdateCallback? update, + JSArray? types, + }); + + external ViewTransitionUpdateCallback? get update; + external set update(ViewTransitionUpdateCallback? value); + external JSArray? get types; + external set types(JSArray? value); +} /// The **`ViewTransition`** interface of the [View Transition API] represents /// an active view transition, and provides functionality to react to the @@ -90,3 +106,4 @@ extension type ViewTransition._(JSObject _) implements JSObject { external ViewTransitionTypeSet get types; external set types(ViewTransitionTypeSet value); } +extension type ViewTransitionTypeSet._(JSObject _) implements JSObject {} diff --git a/web/lib/src/dom/css_view_transitions_2.dart b/web/lib/src/dom/css_view_transitions_2.dart deleted file mode 100644 index c7772a02..00000000 --- a/web/lib/src/dom/css_view_transitions_2.dart +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) 2025, 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. - -// ignore_for_file: constant_identifier_names, non_constant_identifier_names - -@JS() -library; - -import 'dart:js_interop'; - -import 'css_view_transitions.dart'; -import 'cssom.dart'; - -extension type CSSViewTransitionRule._(JSObject _) - implements CSSRule, JSObject { - external String get navigation; - external JSArray get types; -} -extension type ViewTransitionTypeSet._(JSObject _) implements JSObject {} -extension type StartViewTransitionOptions._(JSObject _) implements JSObject { - external factory StartViewTransitionOptions({ - ViewTransitionUpdateCallback? update, - JSArray? types, - }); - - external ViewTransitionUpdateCallback? get update; - external set update(ViewTransitionUpdateCallback? value); - external JSArray? get types; - external set types(JSArray? value); -} diff --git a/web/lib/src/dom/cssom.dart b/web/lib/src/dom/cssom.dart index fa8e6424..ae42ee01 100644 --- a/web/lib/src/dom/cssom.dart +++ b/web/lib/src/dom/cssom.dart @@ -686,6 +686,8 @@ extension type CSSStyleDeclaration._(JSObject _) implements JSObject { external set animationPlayState(String value); external String get animationRange; external set animationRange(String value); + external String get animationRangeCenter; + external set animationRangeCenter(String value); external String get animationRangeEnd; external set animationRangeEnd(String value); external String get animationRangeStart; @@ -696,6 +698,8 @@ extension type CSSStyleDeclaration._(JSObject _) implements JSObject { external set animationTimingFunction(String value); external String get animationTrigger; external set animationTrigger(String value); + external String get animationTriggerBehavior; + external set animationTriggerBehavior(String value); external String get animationTriggerExitRange; external set animationTriggerExitRange(String value); external String get animationTriggerExitRangeEnd; @@ -710,8 +714,6 @@ extension type CSSStyleDeclaration._(JSObject _) implements JSObject { external set animationTriggerRangeStart(String value); external String get animationTriggerTimeline; external set animationTriggerTimeline(String value); - external String get animationTriggerType; - external set animationTriggerType(String value); external String get appearance; external set appearance(String value); external String get aspectRatio; @@ -1046,36 +1048,70 @@ extension type CSSStyleDeclaration._(JSObject _) implements JSObject { external set continue_(String value); external String get copyInto; external set copyInto(String value); + external String get corner; + external set corner(String value); + external String get cornerBlockEnd; + external set cornerBlockEnd(String value); external String get cornerBlockEndShape; external set cornerBlockEndShape(String value); + external String get cornerBlockStart; + external set cornerBlockStart(String value); external String get cornerBlockStartShape; external set cornerBlockStartShape(String value); + external String get cornerBottom; + external set cornerBottom(String value); + external String get cornerBottomLeft; + external set cornerBottomLeft(String value); external String get cornerBottomLeftShape; external set cornerBottomLeftShape(String value); + external String get cornerBottomRight; + external set cornerBottomRight(String value); external String get cornerBottomRightShape; external set cornerBottomRightShape(String value); external String get cornerBottomShape; external set cornerBottomShape(String value); + external String get cornerEndEnd; + external set cornerEndEnd(String value); external String get cornerEndEndShape; external set cornerEndEndShape(String value); + external String get cornerEndStart; + external set cornerEndStart(String value); external String get cornerEndStartShape; external set cornerEndStartShape(String value); + external String get cornerInlineEnd; + external set cornerInlineEnd(String value); external String get cornerInlineEndShape; external set cornerInlineEndShape(String value); + external String get cornerInlineStart; + external set cornerInlineStart(String value); external String get cornerInlineStartShape; external set cornerInlineStartShape(String value); + external String get cornerLeft; + external set cornerLeft(String value); external String get cornerLeftShape; external set cornerLeftShape(String value); + external String get cornerRight; + external set cornerRight(String value); external String get cornerRightShape; external set cornerRightShape(String value); external String get cornerShape; external set cornerShape(String value); + external String get cornerStartEnd; + external set cornerStartEnd(String value); external String get cornerStartEndShape; external set cornerStartEndShape(String value); + external String get cornerStartStart; + external set cornerStartStart(String value); external String get cornerStartStartShape; external set cornerStartStartShape(String value); + external String get cornerTop; + external set cornerTop(String value); + external String get cornerTopLeft; + external set cornerTopLeft(String value); external String get cornerTopLeftShape; external set cornerTopLeftShape(String value); + external String get cornerTopRight; + external set cornerTopRight(String value); external String get cornerTopRightShape; external set cornerTopRightShape(String value); external String get cornerTopShape; @@ -1226,20 +1262,6 @@ extension type CSSStyleDeclaration._(JSObject _) implements JSObject { external set forcedColorAdjust(String value); external String get gap; external set gap(String value); - external String get gapRule; - external set gapRule(String value); - external String get gapRuleBreak; - external set gapRuleBreak(String value); - external String get gapRuleColor; - external set gapRuleColor(String value); - external String get gapRuleOutset; - external set gapRuleOutset(String value); - external String get gapRulePaintOrder; - external set gapRulePaintOrder(String value); - external String get gapRuleStyle; - external set gapRuleStyle(String value); - external String get gapRuleWidth; - external set gapRuleWidth(String value); external String get glyphOrientationVertical; external set glyphOrientationVertical(String value); external String get grid; @@ -1328,6 +1350,12 @@ extension type CSSStyleDeclaration._(JSObject _) implements JSObject { external set insetInlineStart(String value); external String get interactivity; external set interactivity(String value); + external String get interestDelay; + external set interestDelay(String value); + external String get interestDelayEnd; + external set interestDelayEnd(String value); + external String get interestDelayStart; + external set interestDelayStart(String value); external String get interpolateSize; external set interpolateSize(String value); external String get isolation; @@ -1340,8 +1368,8 @@ extension type CSSStyleDeclaration._(JSObject _) implements JSObject { external set itemFlow(String value); external String get itemPack; external set itemPack(String value); - external String get itemSlack; - external set itemSlack(String value); + external String get itemTolerance; + external set itemTolerance(String value); external String get itemTrack; external set itemTrack(String value); external String get itemWrap; @@ -1622,6 +1650,12 @@ extension type CSSStyleDeclaration._(JSObject _) implements JSObject { external set placeSelf(String value); external String get pointerEvents; external set pointerEvents(String value); + external String get pointerTimeline; + external set pointerTimeline(String value); + external String get pointerTimelineAxis; + external set pointerTimelineAxis(String value); + external String get pointerTimelineName; + external set pointerTimelineName(String value); external String get position; external set position(String value); external String get positionAnchor; @@ -1682,6 +1716,20 @@ extension type CSSStyleDeclaration._(JSObject _) implements JSObject { external set rubyOverhang(String value); external String get rubyPosition; external set rubyPosition(String value); + external String get rule; + external set rule(String value); + external String get ruleBreak; + external set ruleBreak(String value); + external String get ruleColor; + external set ruleColor(String value); + external String get ruleOutset; + external set ruleOutset(String value); + external String get ruleOverlap; + external set ruleOverlap(String value); + external String get ruleStyle; + external set ruleStyle(String value); + external String get ruleWidth; + external set ruleWidth(String value); external String get rx; external set rx(String value); external String get ry; @@ -1744,6 +1792,8 @@ extension type CSSStyleDeclaration._(JSObject _) implements JSObject { external set scrollSnapStop(String value); external String get scrollSnapType; external set scrollSnapType(String value); + external String get scrollTargetGroup; + external set scrollTargetGroup(String value); external String get scrollTimeline; external set scrollTimeline(String value); external String get scrollTimelineAxis; @@ -1770,6 +1820,8 @@ extension type CSSStyleDeclaration._(JSObject _) implements JSObject { external set shapeRendering(String value); external String get shapeSubtract; external set shapeSubtract(String value); + external String get sliderOrientation; + external set sliderOrientation(String value); external String get spatialNavigationAction; external set spatialNavigationAction(String value); external String get spatialNavigationContain; diff --git a/web/lib/src/dom/digital_credentials.dart b/web/lib/src/dom/digital_credentials.dart index fffab519..4a0dd409 100644 --- a/web/lib/src/dom/digital_credentials.dart +++ b/web/lib/src/dom/digital_credentials.dart @@ -18,13 +18,33 @@ import 'dart:js_interop'; extension type DigitalCredentialRequestOptions._(JSObject _) implements JSObject { external factory DigitalCredentialRequestOptions( - {JSArray requests}); + {required JSArray requests}); - external JSArray get requests; - external set requests(JSArray value); + external JSArray get requests; + external set requests(JSArray value); } -extension type DigitalCredentialRequest._(JSObject _) implements JSObject { - external factory DigitalCredentialRequest({ +extension type DigitalCredentialGetRequest._(JSObject _) implements JSObject { + external factory DigitalCredentialGetRequest({ + required String protocol, + required JSObject data, + }); + + external String get protocol; + external set protocol(String value); + external JSObject get data; + external set data(JSObject value); +} +extension type DigitalCredentialCreationOptions._(JSObject _) + implements JSObject { + external factory DigitalCredentialCreationOptions( + {JSArray requests}); + + external JSArray get requests; + external set requests(JSArray value); +} +extension type DigitalCredentialCreateRequest._(JSObject _) + implements JSObject { + external factory DigitalCredentialCreateRequest({ required String protocol, required JSObject data, }); diff --git a/web/lib/src/dom/dom.dart b/web/lib/src/dom/dom.dart index dbd3972a..6595dc82 100644 --- a/web/lib/src/dom/dom.dart +++ b/web/lib/src/dom/dom.dart @@ -1489,7 +1489,7 @@ extension type Document._(JSObject _) implements Node, JSObject { /// original document. The imported node is a clone of the original. external Node importNode( Node node, [ - bool subtree, + JSAny options, ]); /// **`Document.adoptNode()`** transfers a from another [Document] into the @@ -2664,13 +2664,29 @@ extension type Document._(JSObject _) implements Node, JSObject { /// [MDN Web Docs](https://developer.mozilla.org/en-US/docs/Web/API/XMLDocument). extension type XMLDocument._(JSObject _) implements Document, JSObject {} extension type ElementCreationOptions._(JSObject _) implements JSObject { - external factory ElementCreationOptions({String is_}); + external factory ElementCreationOptions({ + CustomElementRegistry customElementRegistry, + String is_, + }); + external CustomElementRegistry get customElementRegistry; + external set customElementRegistry(CustomElementRegistry value); @JS('is') external String get is_; @JS('is') external set is_(String value); } +extension type ImportNodeOptions._(JSObject _) implements JSObject { + external factory ImportNodeOptions({ + CustomElementRegistry customElementRegistry, + bool selfOnly, + }); + + external CustomElementRegistry get customElementRegistry; + external set customElementRegistry(CustomElementRegistry value); + external bool get selfOnly; + external set selfOnly(bool value); +} /// The **`DOMImplementation`** interface represents an object providing methods /// which are not dependent on any particular document. Such an object is @@ -2687,7 +2703,7 @@ extension type DOMImplementation._(JSObject _) implements JSObject { /// into the document via methods like [Node.insertBefore] or /// [Node.replaceChild]. external DocumentType createDocumentType( - String qualifiedName, + String name, String publicId, String systemId, ); @@ -3432,13 +3448,13 @@ extension type Element._(JSObject _) implements Node, JSObject { /// **`scrollIntoView()`** method scrolls the element's ancestor /// containers such that the element on which `scrollIntoView()` is called is /// visible to the user. - external void scrollIntoView([JSAny arg]); + external JSPromise scrollIntoView([JSAny arg]); /// The **`scroll()`** method of the [Element] /// interface scrolls the element to a particular set of coordinates inside a /// given /// element. - external void scroll([ + external JSPromise scroll([ JSAny optionsOrX, num y, ]); @@ -3446,14 +3462,14 @@ extension type Element._(JSObject _) implements Node, JSObject { /// The **`scrollTo()`** method of the [Element] /// interface scrolls to a particular set of coordinates inside a given /// element. - external void scrollTo([ + external JSPromise scrollTo([ JSAny optionsOrX, num y, ]); /// The **`scrollBy()`** method of the [Element] /// interface scrolls an element by the given amount. - external void scrollBy([ + external JSPromise scrollBy([ JSAny optionsOrX, num y, ]); @@ -4044,6 +4060,8 @@ extension type Element._(JSObject _) implements Node, JSObject { external HTMLSlotElement? get assignedSlot; external String? get role; external set role(String? value); + external Element? get ariaActiveDescendantElement; + external set ariaActiveDescendantElement(Element? value); /// The **`ariaAtomic`** property of the [Element] interface reflects the /// value of the @@ -4149,6 +4167,8 @@ extension type Element._(JSObject _) implements Node, JSObject { /// gridcell within a table, grid, or treegrid. external String? get ariaColSpan; external set ariaColSpan(String? value); + external JSArray? get ariaControlsElements; + external set ariaControlsElements(JSArray? value); /// The **`ariaCurrent`** property of the [Element] interface reflects the /// value of the @@ -4157,6 +4177,8 @@ extension type Element._(JSObject _) implements Node, JSObject { /// within a container or set of related elements. external String? get ariaCurrent; external set ariaCurrent(String? value); + external JSArray? get ariaDescribedByElements; + external set ariaDescribedByElements(JSArray? value); /// The **`ariaDescription`** property of the [Element] interface reflects the /// value of the @@ -4165,6 +4187,8 @@ extension type Element._(JSObject _) implements Node, JSObject { /// current element. external String? get ariaDescription; external set ariaDescription(String? value); + external JSArray? get ariaDetailsElements; + external set ariaDetailsElements(JSArray? value); /// The **`ariaDisabled`** property of the [Element] interface reflects the /// value of the @@ -4178,6 +4202,8 @@ extension type Element._(JSObject _) implements Node, JSObject { /// > not require ARIA attributes. external String? get ariaDisabled; external set ariaDisabled(String? value); + external JSArray? get ariaErrorMessageElements; + external set ariaErrorMessageElements(JSArray? value); /// The **`ariaExpanded`** property of the [Element] interface reflects the /// value of the @@ -4186,6 +4212,8 @@ extension type Element._(JSObject _) implements Node, JSObject { /// by this element is expanded or collapsed. external String? get ariaExpanded; external set ariaExpanded(String? value); + external JSArray? get ariaFlowToElements; + external set ariaFlowToElements(JSArray? value); /// The **`ariaHasPopup`** property of the [Element] interface reflects the /// value of the @@ -4218,6 +4246,8 @@ extension type Element._(JSObject _) implements Node, JSObject { /// attribute, which defines a string value that labels the current element. external String? get ariaLabel; external set ariaLabel(String? value); + external JSArray? get ariaLabelledByElements; + external set ariaLabelledByElements(JSArray? value); /// The **`ariaLevel`** property of the [Element] interface reflects the value /// of the `aria-level` attribute, which defines the hierarchical level of an @@ -4280,6 +4310,8 @@ extension type Element._(JSObject _) implements Node, JSObject { /// horizontal, vertical, or unknown/ambiguous. external String? get ariaOrientation; external set ariaOrientation(String? value); + external JSArray? get ariaOwnsElements; + external set ariaOwnsElements(JSArray? value); /// The **`ariaPlaceholder`** property of the [Element] interface reflects the /// value of the `aria-placeholder` attribute, which defines a short hint @@ -4436,6 +4468,7 @@ extension type ShadowRootInit._(JSObject _) implements JSObject { SlotAssignmentMode slotAssignment, bool clonable, bool serializable, + CustomElementRegistry? customElementRegistry, }); external ShadowRootMode get mode; @@ -4448,6 +4481,8 @@ extension type ShadowRootInit._(JSObject _) implements JSObject { external set clonable(bool value); external bool get serializable; external set serializable(bool value); + external CustomElementRegistry? get customElementRegistry; + external set customElementRegistry(CustomElementRegistry? value); } /// The **`NamedNodeMap`** interface represents a collection of [Attr] objects. diff --git a/web/lib/src/dom/fedcm.dart b/web/lib/src/dom/fedcm.dart index f9dfe1a2..8195296a 100644 --- a/web/lib/src/dom/fedcm.dart +++ b/web/lib/src/dom/fedcm.dart @@ -60,15 +60,12 @@ extension type IdentityProviderRequestOptions._(JSObject _) external factory IdentityProviderRequestOptions({ required String configURL, required String clientId, - String nonce, String loginHint, String domainHint, JSArray fields, JSAny? params, }); - external String get nonce; - external set nonce(String value); external String get loginHint; external set loginHint(String value); external String get domainHint; diff --git a/web/lib/src/dom/fetch.dart b/web/lib/src/dom/fetch.dart index 62c333da..ae60ab61 100644 --- a/web/lib/src/dom/fetch.dart +++ b/web/lib/src/dom/fetch.dart @@ -18,7 +18,7 @@ import 'dart:js_interop'; import 'attribution_reporting_api.dart'; import 'dom.dart'; import 'fileapi.dart'; -import 'private_network_access.dart'; +import 'local_network_access.dart'; import 'referrer_policy.dart'; import 'streams.dart'; import 'trust_token_api.dart'; diff --git a/web/lib/src/dom/html.dart b/web/lib/src/dom/html.dart index 0ce2329e..b8a07e21 100644 --- a/web/lib/src/dom/html.dart +++ b/web/lib/src/dom/html.dart @@ -17,7 +17,7 @@ import 'dart:js_interop'; import 'battery_status.dart'; import 'clipboard_apis.dart'; -import 'cookie_store.dart'; +import 'cookiestore.dart'; import 'credential_management.dart'; import 'css_font_loading.dart'; import 'css_typed_om.dart'; @@ -56,7 +56,7 @@ import 'vibration.dart'; import 'video_rvfc.dart'; import 'web_locks.dart'; import 'web_share.dart'; -import 'webcryptoapi.dart'; +import 'webcrypto.dart'; import 'webidl.dart'; import 'webmidi.dart'; import 'xhr.dart'; @@ -71,6 +71,7 @@ typedef EventHandler = EventHandlerNonNull?; typedef OnErrorEventHandler = OnErrorEventHandlerNonNull?; typedef OnBeforeUnloadEventHandler = OnBeforeUnloadEventHandlerNonNull?; typedef TimerHandler = JSAny; +typedef ImageDataArray = JSTypedArray; typedef ImageBitmapSource = JSObject; typedef MessageEventSource = JSObject; typedef BlobCallback = JSFunction; @@ -86,7 +87,6 @@ typedef CanPlayTypeResult = String; typedef TextTrackMode = String; typedef TextTrackKind = String; typedef SelectionMode = String; -typedef PredefinedColorSpace = String; typedef CanvasColorType = String; typedef CanvasFillRule = String; typedef ImageSmoothingQuality = String; @@ -100,8 +100,10 @@ typedef CanvasFontStretch = String; typedef CanvasFontVariantCaps = String; typedef CanvasTextRendering = String; typedef OffscreenRenderingContextId = String; +typedef PredefinedColorSpace = String; typedef ScrollRestoration = String; typedef DOMParserSupportedType = String; +typedef ImageDataPixelFormat = String; typedef ImageOrientation = String; typedef PremultiplyAlpha = String; typedef ColorSpaceConversion = String; @@ -857,7 +859,7 @@ extension type HTMLElement._(JSObject _) implements Element, JSObject { /// > /// > The `style` property has the same priority in the CSS cascade as an /// > inline style declaration set via the `style` attribute. - external CSSStyleDeclaration get style; + external JSObject get style; /// The **`attributeStyleMap`** read-only property of the [HTMLElement] /// interface returns a live [StylePropertyMap] object that contains a list of @@ -8355,6 +8357,17 @@ extension type HTMLDialogElement._(JSObject _) /// `returnValue` of the dialog. external void close([String returnValue]); + /// The **`requestClose()`** method of the [HTMLDialogElement] interface + /// requests to close the `dialog`. + /// An optional string may be passed as an argument, updating the + /// `returnValue` of the dialog. + /// + /// This method differs from the `HTMLDialogElement.close()` method by firing + /// a `cancel` event before firing the `close` event. This allows + /// authors to prevent the dialog from closing. This method exposes the same + /// behavior as the dialog's internal close watcher. + external void requestClose([String returnValue]); + /// The **`open`** property of the /// [HTMLDialogElement] interface is a boolean value reflecting the /// [`open`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/dialog#open) @@ -8400,6 +8413,13 @@ extension type HTMLScriptElement._(JSObject _) /// which are supported by most modern browsers. external static bool supports(String type); + /// The **`type`** property of the [HTMLScriptElement] interface is a string + /// that reflects the type of the script. + /// + /// It reflects the `type` attribute of the `script` element. + external String get type; + external set type(String value); + /// The **`src`** property of the [HTMLScriptElement] interface is a string /// representing the URL of an external script; this can be used as an /// alternative to embedding a script directly within a document. @@ -8408,13 +8428,6 @@ extension type HTMLScriptElement._(JSObject _) external String get src; external set src(String value); - /// The **`type`** property of the [HTMLScriptElement] interface is a string - /// that reflects the type of the script. - /// - /// It reflects the `type` attribute of the `script` element. - external String get type; - external set type(String value); - /// The **`noModule`** property of the [HTMLScriptElement] interface is a /// boolean value that indicates whether the script should be executed in /// browsers that support @@ -8452,6 +8465,13 @@ extension type HTMLScriptElement._(JSObject _) external bool get defer; external set defer(bool value); + /// The **`blocking`** property of the [HTMLScriptElement] interface is a + /// string indicating that certain operations should be blocked on the + /// fetching of the script. + /// + /// It reflects the `blocking` attribute of the `script` element. + external DOMTokenList get blocking; + /// The **`crossOrigin`** property of the [HTMLScriptElement] interface /// reflects the settings for the script element. For classic scripts from /// other [origins](https://developer.mozilla.org/en-US/docs/Glossary/Origin), @@ -8462,22 +8482,6 @@ extension type HTMLScriptElement._(JSObject _) external String? get crossOrigin; external set crossOrigin(String? value); - /// The **`text`** property of the [HTMLScriptElement] interface is a string - /// that reflects the text content inside the `script` element. It acts the - /// same way as the [Node.textContent] property. - /// - /// It reflects the `text` attribute of the `script` element. - external String get text; - external set text(String value); - - /// The **`integrity`** property of the [HTMLScriptElement] interface is a - /// string that contains inline metadata that a browser can use to verify that - /// a fetched resource has been delivered without unexpected manipulation. - /// - /// It reflects the `integrity` attribute of the `script` element. - external String get integrity; - external set integrity(String value); - /// The **`referrerPolicy`** property of the /// [HTMLScriptElement] interface reflects the HTML /// [`referrerpolicy`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/script#referrerpolicy) @@ -8486,12 +8490,13 @@ extension type HTMLScriptElement._(JSObject _) external String get referrerPolicy; external set referrerPolicy(String value); - /// The **`blocking`** property of the [HTMLScriptElement] interface is a - /// string indicating that certain operations should be blocked on the - /// fetching of the script. + /// The **`integrity`** property of the [HTMLScriptElement] interface is a + /// string that contains inline metadata that a browser can use to verify that + /// a fetched resource has been delivered without unexpected manipulation. /// - /// It reflects the `blocking` attribute of the `script` element. - external DOMTokenList get blocking; + /// It reflects the `integrity` attribute of the `script` element. + external String get integrity; + external set integrity(String value); /// The **`fetchPriority`** property of the [HTMLScriptElement] interface /// represents a hint to the browser indicating how it should prioritize @@ -8521,6 +8526,14 @@ extension type HTMLScriptElement._(JSObject _) /// impact of `fetchPriority` on the priority, are entirely browser dependent. external String get fetchPriority; external set fetchPriority(String value); + + /// The **`text`** property of the [HTMLScriptElement] interface is a string + /// that reflects the text content inside the `script` element. It acts the + /// same way as the [Node.textContent] property. + /// + /// It reflects the `text` attribute of the `script` element. + external String get text; + external set text(String value); external String get charset; external set charset(String value); external String get event; @@ -10091,60 +10104,6 @@ extension type TextMetrics._(JSObject _) implements JSObject { /// ideographic baseline of the line box, in CSS pixels. external double get ideographicBaseline; } -extension type ImageDataSettings._(JSObject _) implements JSObject { - external factory ImageDataSettings({PredefinedColorSpace colorSpace}); - - external PredefinedColorSpace get colorSpace; - external set colorSpace(PredefinedColorSpace value); -} - -/// The **`ImageData`** interface represents the underlying pixel data of an -/// area of a `canvas` element. -/// -/// It is created using the [ImageData.ImageData] constructor or creator methods -/// on the [CanvasRenderingContext2D] object associated with a canvas: -/// [CanvasRenderingContext2D.createImageData] and -/// [CanvasRenderingContext2D.getImageData]. It can also be used to set a part -/// of the canvas by using [CanvasRenderingContext2D.putImageData]. -/// -/// --- -/// -/// API documentation sourced from -/// [MDN Web Docs](https://developer.mozilla.org/en-US/docs/Web/API/ImageData). -extension type ImageData._(JSObject _) implements JSObject { - external factory ImageData( - JSAny dataOrSw, - int shOrSw, [ - JSAny settingsOrSh, - ImageDataSettings settings, - ]); - - /// The readonly **`ImageData.width`** property returns the number - /// of pixels per row in the [ImageData] object. - external int get width; - - /// The readonly **`ImageData.height`** property returns the number - /// of rows in the [ImageData] object. - external int get height; - - /// The readonly **`ImageData.data`** property returns a - /// `Uint8ClampedArray` that contains the [ImageData] object's - /// pixel data. Data is stored as a one-dimensional array in the RGBA order, - /// with integer - /// values between `0` and `255` (inclusive). - external JSUint8ClampedArray get data; - - /// The read-only **`ImageData.colorSpace`** property is a string indicating - /// the color space of the image data. - /// - /// The color space can be set during `ImageData` initialization using either - /// the - /// [`ImageData()`](https://developer.mozilla.org/en-US/docs/Web/API/ImageData/ImageData) - /// constructor or the - /// [`createImageData()`](https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/createImageData) - /// method. - external PredefinedColorSpace get colorSpace; -} /// The **`Path2D`** interface of the Canvas 2D API is used to declare a path /// that can then be used on a [CanvasRenderingContext2D] object. The @@ -10772,6 +10731,8 @@ extension type ElementInternals._(JSObject _) implements JSObject { /// implicit ARIA role, if any, unless explicitly set. external String? get role; external set role(String? value); + external Element? get ariaActiveDescendantElement; + external set ariaActiveDescendantElement(Element? value); /// The **`ariaAtomic`** property of the [ElementInternals] interface reflects /// the value of the @@ -10908,6 +10869,8 @@ extension type ElementInternals._(JSObject _) implements JSObject { /// > [Accessibility Object Model explainer](https://wicg.github.io/aom/explainer.html#default-semantics-for-custom-elements-via-the-elementinternals-object). external String? get ariaColSpan; external set ariaColSpan(String? value); + external JSArray? get ariaControlsElements; + external set ariaControlsElements(JSArray? value); /// The **`ariaCurrent`** property of the [ElementInternals] interface /// reflects the value of the @@ -10924,6 +10887,8 @@ extension type ElementInternals._(JSObject _) implements JSObject { /// > [Accessibility Object Model explainer](https://wicg.github.io/aom/explainer.html#default-semantics-for-custom-elements-via-the-elementinternals-object). external String? get ariaCurrent; external set ariaCurrent(String? value); + external JSArray? get ariaDescribedByElements; + external set ariaDescribedByElements(JSArray? value); /// The **`ariaDescription`** property of the [ElementInternals] interface /// reflects the value of the @@ -10940,6 +10905,8 @@ extension type ElementInternals._(JSObject _) implements JSObject { /// > [Accessibility Object Model explainer](https://wicg.github.io/aom/explainer.html#default-semantics-for-custom-elements-via-the-elementinternals-object). external String? get ariaDescription; external set ariaDescription(String? value); + external JSArray? get ariaDetailsElements; + external set ariaDetailsElements(JSArray? value); /// The **`ariaDisabled`** property of the [ElementInternals] interface /// reflects the value of the @@ -10956,6 +10923,8 @@ extension type ElementInternals._(JSObject _) implements JSObject { /// > [Accessibility Object Model explainer](https://wicg.github.io/aom/explainer.html#default-semantics-for-custom-elements-via-the-elementinternals-object). external String? get ariaDisabled; external set ariaDisabled(String? value); + external JSArray? get ariaErrorMessageElements; + external set ariaErrorMessageElements(JSArray? value); /// The **`ariaExpanded`** property of the [ElementInternals] interface /// reflects the value of the @@ -10972,6 +10941,8 @@ extension type ElementInternals._(JSObject _) implements JSObject { /// > [Accessibility Object Model explainer](https://wicg.github.io/aom/explainer.html#default-semantics-for-custom-elements-via-the-elementinternals-object). external String? get ariaExpanded; external set ariaExpanded(String? value); + external JSArray? get ariaFlowToElements; + external set ariaFlowToElements(JSArray? value); /// The **`ariaHasPopup`** property of the [ElementInternals] interface /// reflects the value of the @@ -11037,6 +11008,8 @@ extension type ElementInternals._(JSObject _) implements JSObject { /// > [Accessibility Object Model explainer](https://wicg.github.io/aom/explainer.html#default-semantics-for-custom-elements-via-the-elementinternals-object). external String? get ariaLabel; external set ariaLabel(String? value); + external JSArray? get ariaLabelledByElements; + external set ariaLabelledByElements(JSArray? value); /// The **`ariaLevel`** property of the [ElementInternals] interface reflects /// the value of the @@ -11133,6 +11106,8 @@ extension type ElementInternals._(JSObject _) implements JSObject { /// > [Accessibility Object Model explainer](https://wicg.github.io/aom/explainer.html#default-semantics-for-custom-elements-via-the-elementinternals-object). external String? get ariaOrientation; external set ariaOrientation(String? value); + external JSArray? get ariaOwnsElements; + external set ariaOwnsElements(JSArray? value); /// The **`ariaPlaceholder`** property of the [ElementInternals] interface /// reflects the value of the @@ -11513,12 +11488,15 @@ extension type ToggleEventInit._(JSObject _) implements EventInit, JSObject { bool composed, String oldState, String newState, + Element? source, }); external String get oldState; external set oldState(String value); external String get newState; external set newState(String value); + external Element? get source; + external set source(Element? value); } extension type FocusOptions._(JSObject _) implements JSObject { external factory FocusOptions({ @@ -12123,21 +12101,21 @@ extension type Window._(JSObject _) implements EventTarget, JSObject { /// The **`Window.scroll()`** method scrolls the window to a /// particular place in the document. - external void scroll([ + external JSPromise scroll([ JSAny optionsOrX, num y, ]); /// **`Window.scrollTo()`** scrolls to a particular set of /// coordinates in the document. - external void scrollTo([ + external JSPromise scrollTo([ JSAny optionsOrX, num y, ]); /// The **`Window.scrollBy()`** method scrolls the document in the /// window by the given amount. - external void scrollBy([ + external JSPromise scrollBy([ JSAny optionsOrX, num y, ]); @@ -12151,7 +12129,7 @@ extension type Window._(JSObject _) implements EventTarget, JSObject { /// Individual CSS property values are accessed through APIs provided by the /// object, or by /// indexing with CSS property names. - external CSSStyleDeclaration getComputedStyle( + external JSObject getComputedStyle( Element elt, [ String? pseudoElt, ]); @@ -13098,21 +13076,6 @@ extension type Window._(JSObject _) implements EventTarget, JSObject { /// asynchronously access the capabilities of indexed databases. external IDBFactory get indexedDB; - /// The **`crypto`** read-only property of the [Window] interface returns the - /// [Crypto] object for this window's scope. This object gives web pages - /// access to certain cryptographic related services. - /// - /// Although the property itself is read-only, all of its methods (and the - /// methods of its - /// child object, [SubtleCrypto]) are not read-only, and therefore vulnerable - /// to attack by . - /// - /// Although `crypto` is available on all windows, the returned `Crypto` - /// object only has one usable feature in insecure contexts: the - /// [Crypto.getRandomValues] method. In general, you should use this API only - /// in secure contexts. - external Crypto get crypto; - /// The **`performance`** property of the [Window] interface returns a /// [Performance] object, which can be used to gather performance information /// about code running in the window's scope. @@ -13142,6 +13105,21 @@ extension type Window._(JSObject _) implements EventTarget, JSObject { /// object, providing the entry point for using the [Trusted Types API]. external TrustedTypePolicyFactory get trustedTypes; + /// The **`crypto`** read-only property of the [Window] interface returns the + /// [Crypto] object for this window's scope. This object gives web pages + /// access to certain cryptographic related services. + /// + /// Although the property itself is read-only, all of its methods (and the + /// methods of its + /// child object, [SubtleCrypto]) are not read-only, and therefore vulnerable + /// to attack by . + /// + /// Although `crypto` is available on all windows, the returned `Crypto` + /// object only has one usable feature in insecure contexts: the + /// [Crypto.getRandomValues] method. In general, you should use this API only + /// in secure contexts. + external Crypto get crypto; + /// The read-only **`sessionStorage`** property accesses a session [Storage] /// object for the current . `sessionStorage` is similar to /// [Window.localStorage]; the difference is that while `localStorage` is @@ -13905,6 +13883,25 @@ extension type DOMParser._(JSObject _) implements JSObject { ); } +/// The `XMLSerializer` interface provides the [XMLSerializer.serializeToString] +/// method to construct an XML string representing a tree. +/// +/// > [!NOTE] +/// > The resulting XML string is not guaranteed to be well-formed XML. +/// +/// --- +/// +/// API documentation sourced from +/// [MDN Web Docs](https://developer.mozilla.org/en-US/docs/Web/API/XMLSerializer). +extension type XMLSerializer._(JSObject _) implements JSObject { + external factory XMLSerializer(); + + /// The [XMLSerializer] method + /// **`serializeToString()`** constructs a string representing the + /// specified tree in form. + external String serializeToString(Node root); +} + /// The **`Navigator`** interface represents the state and the identity of the /// user agent. It allows scripts to query it and to register themselves to /// carry on some activities. @@ -14614,6 +14611,65 @@ extension type MimeType._(JSObject _) implements JSObject { external String get suffixes; external Plugin get enabledPlugin; } +extension type ImageDataSettings._(JSObject _) implements JSObject { + external factory ImageDataSettings({ + PredefinedColorSpace colorSpace, + ImageDataPixelFormat pixelFormat, + }); + + external PredefinedColorSpace get colorSpace; + external set colorSpace(PredefinedColorSpace value); + external ImageDataPixelFormat get pixelFormat; + external set pixelFormat(ImageDataPixelFormat value); +} + +/// The **`ImageData`** interface represents the underlying pixel data of an +/// area of a `canvas` element. +/// +/// It is created using the [ImageData.ImageData] constructor or creator methods +/// on the [CanvasRenderingContext2D] object associated with a canvas: +/// [CanvasRenderingContext2D.createImageData] and +/// [CanvasRenderingContext2D.getImageData]. It can also be used to set a part +/// of the canvas by using [CanvasRenderingContext2D.putImageData]. +/// +/// --- +/// +/// API documentation sourced from +/// [MDN Web Docs](https://developer.mozilla.org/en-US/docs/Web/API/ImageData). +extension type ImageData._(JSObject _) implements JSObject { + external factory ImageData( + JSAny dataOrSw, + int shOrSw, [ + JSAny settingsOrSh, + ImageDataSettings settings, + ]); + + /// The readonly **`ImageData.width`** property returns the number + /// of pixels per row in the [ImageData] object. + external int get width; + + /// The readonly **`ImageData.height`** property returns the number + /// of rows in the [ImageData] object. + external int get height; + + /// The readonly **`ImageData.data`** property returns a + /// `Uint8ClampedArray` that contains the [ImageData] object's + /// pixel data. Data is stored as a one-dimensional array in the RGBA order, + /// with integer + /// values between `0` and `255` (inclusive). + external ImageDataArray get data; + + /// The read-only **`ImageData.colorSpace`** property is a string indicating + /// the color space of the image data. + /// + /// The color space can be set during `ImageData` initialization using either + /// the + /// [`ImageData()`](https://developer.mozilla.org/en-US/docs/Web/API/ImageData/ImageData) + /// constructor or the + /// [`createImageData()`](https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/createImageData) + /// method. + external PredefinedColorSpace get colorSpace; +} /// The **`ImageBitmap`** interface represents a bitmap image which can be drawn /// to a `canvas` without undue latency. It can be created from a variety of @@ -15300,23 +15356,6 @@ extension type WorkerGlobalScope._(JSObject _) /// asynchronously access the capabilities of indexed databases. external IDBFactory get indexedDB; - /// @AvailableInWorkers("worker") - /// - /// The **`crypto`** read-only property of the [WorkerGlobalScope] interface - /// returns the [Crypto] object for this worker. This object gives workers - /// access to certain cryptographic related services. - /// - /// Although the property itself is read-only, all of its methods (and the - /// methods of its - /// child object, [SubtleCrypto]) are not read-only, and therefore vulnerable - /// to attack by . - /// - /// Although `crypto` is available on all workers, the returned `Crypto` - /// object only has one usable feature in insecure contexts: the - /// [Crypto.getRandomValues] method. In general, you should use this API only - /// in secure contexts. - external Crypto get crypto; - /// @AvailableInWorkers("worker") /// /// The **`performance`** property of the [WorkerGlobalScope] interface @@ -15365,6 +15404,23 @@ extension type WorkerGlobalScope._(JSObject _) /// the global object, providing the entry point for using the /// [Trusted Types API]. external TrustedTypePolicyFactory get trustedTypes; + + /// @AvailableInWorkers("worker") + /// + /// The **`crypto`** read-only property of the [WorkerGlobalScope] interface + /// returns the [Crypto] object for this worker. This object gives workers + /// access to certain cryptographic related services. + /// + /// Although the property itself is read-only, all of its methods (and the + /// methods of its + /// child object, [SubtleCrypto]) are not read-only, and therefore vulnerable + /// to attack by . + /// + /// Although `crypto` is available on all workers, the returned `Crypto` + /// object only has one usable feature in insecure contexts: the + /// [Crypto.getRandomValues] method. In general, you should use this API only + /// in secure contexts. + external Crypto get crypto; } /// @AvailableInWorkers("dedicated") @@ -15568,17 +15624,17 @@ extension type Worker._(JSObject _) implements EventTarget, JSObject { } extension type WorkerOptions._(JSObject _) implements JSObject { external factory WorkerOptions({ + String name, WorkerType type, RequestCredentials credentials, - String name, }); + external String get name; + external set name(String value); external WorkerType get type; external set type(WorkerType value); external RequestCredentials get credentials; external set credentials(RequestCredentials value); - external String get name; - external set name(String value); } /// The **`SharedWorker`** interface represents a specific kind of worker that diff --git a/web/lib/src/dom/indexeddb.dart b/web/lib/src/dom/indexeddb.dart index 5b75e3fb..35af9649 100644 --- a/web/lib/src/dom/indexeddb.dart +++ b/web/lib/src/dom/indexeddb.dart @@ -512,7 +512,7 @@ extension type IDBObjectStore._(JSObject _) implements JSObject { /// 2. the [IDBObjectStore.count] method with the same key, which /// will return 1 if the row exists and 0 if it doesn't. external IDBRequest getAll([ - JSAny? query, + JSAny? queryOrOptions, int count, ]); @@ -536,7 +536,7 @@ extension type IDBObjectStore._(JSObject _) implements JSObject { /// method provides a cursor if the record exists, and no cursor if it does /// not. external IDBRequest getAllKeys([ - JSAny? query, + JSAny? queryOrOptions, int count, ]); @@ -730,7 +730,7 @@ extension type IDBIndex._(JSObject _) implements JSObject { /// array of all the objects in an object store, though, you should /// use `getAll()`. external IDBRequest getAll([ - JSAny? query, + JSAny? queryOrOptions, int count, ]); @@ -739,7 +739,7 @@ extension type IDBIndex._(JSObject _) implements JSObject { /// the index, /// setting them as the `result` of the request object. external IDBRequest getAllKeys([ - JSAny? query, + JSAny? queryOrOptions, int count, ]); diff --git a/web/lib/src/dom/largest_contentful_paint.dart b/web/lib/src/dom/largest_contentful_paint.dart index d2676af0..08fcc34f 100644 --- a/web/lib/src/dom/largest_contentful_paint.dart +++ b/web/lib/src/dom/largest_contentful_paint.dart @@ -31,14 +31,14 @@ extension type LargestContentfulPaint._(JSObject _) /// it returns a JSON representation of the [LargestContentfulPaint] object. external JSObject toJSON(); - /// The **`renderTime`** read-only property of the [LargestContentfulPaint] - /// interface represents the time that the element was rendered to the screen. - external double get renderTime; - /// The **`loadTime`** read-only property of the [LargestContentfulPaint] /// interface returns the time that the element was loaded. external double get loadTime; + /// The **`renderTime`** read-only property of the [LargestContentfulPaint] + /// interface represents the time that the element was rendered to the screen. + external double get renderTime; + /// The **`size`** read-only property of the [LargestContentfulPaint] /// interface returns the intrinsic size of the element that is the largest /// contentful paint. diff --git a/web/lib/src/dom/private_network_access.dart b/web/lib/src/dom/local_network_access.dart similarity index 100% rename from web/lib/src/dom/private_network_access.dart rename to web/lib/src/dom/local_network_access.dart diff --git a/web/lib/src/dom/mathml_core.dart b/web/lib/src/dom/mathml_core.dart index 774b5ade..9aa715e1 100644 --- a/web/lib/src/dom/mathml_core.dart +++ b/web/lib/src/dom/mathml_core.dart @@ -16,7 +16,6 @@ library; import 'dart:js_interop'; import 'css_typed_om.dart'; -import 'cssom.dart'; import 'dom.dart'; import 'html.dart'; @@ -281,7 +280,7 @@ extension type MathMLElement._(JSObject _) implements Element, JSObject { /// > /// > The `style` property has the same priority in the CSS cascade as an /// > inline style declaration set via the `style` attribute. - external CSSStyleDeclaration get style; + external JSObject get style; /// The **`attributeStyleMap`** read-only property of the [MathMLElement] /// interface returns a live [StylePropertyMap] object that contains a list of diff --git a/web/lib/src/dom/media_capabilities.dart b/web/lib/src/dom/media_capabilities.dart index 0c72c14b..6e6e4501 100644 --- a/web/lib/src/dom/media_capabilities.dart +++ b/web/lib/src/dom/media_capabilities.dart @@ -176,7 +176,7 @@ extension type MediaCapabilitiesDecodingInfo._(JSObject _) required bool smooth, required bool powerEfficient, required MediaKeySystemAccess? keySystemAccess, - MediaDecodingConfiguration configuration, + required MediaDecodingConfiguration configuration, }); external MediaKeySystemAccess? get keySystemAccess; @@ -190,7 +190,7 @@ extension type MediaCapabilitiesEncodingInfo._(JSObject _) required bool supported, required bool smooth, required bool powerEfficient, - MediaEncodingConfiguration configuration, + required MediaEncodingConfiguration configuration, }); external MediaEncodingConfiguration get configuration; diff --git a/web/lib/src/dom/mediacapture_streams.dart b/web/lib/src/dom/mediacapture_streams.dart index 7543571d..98e49a18 100644 --- a/web/lib/src/dom/mediacapture_streams.dart +++ b/web/lib/src/dom/mediacapture_streams.dart @@ -25,6 +25,7 @@ typedef ConstrainULong = JSAny; typedef ConstrainDouble = JSAny; typedef ConstrainBoolean = JSAny; typedef ConstrainDOMString = JSAny; +typedef ConstrainBooleanOrDOMString = JSAny; typedef MediaStreamTrackState = String; typedef MediaDeviceKind = String; @@ -643,7 +644,7 @@ extension type MediaTrackCapabilities._(JSObject _) implements JSObject { JSArray resizeMode, ULongRange sampleRate, ULongRange sampleSize, - JSArray echoCancellation, + JSArray echoCancellation, JSArray autoGainControl, JSArray noiseSuppression, DoubleRange latency, @@ -688,8 +689,8 @@ extension type MediaTrackCapabilities._(JSObject _) implements JSObject { external set sampleRate(ULongRange value); external ULongRange get sampleSize; external set sampleSize(ULongRange value); - external JSArray get echoCancellation; - external set echoCancellation(JSArray value); + external JSArray get echoCancellation; + external set echoCancellation(JSArray value); external JSArray get autoGainControl; external set autoGainControl(JSArray value); external JSArray get noiseSuppression; @@ -767,7 +768,7 @@ extension type MediaTrackConstraints._(JSObject _) ConstrainDOMString resizeMode, ConstrainULong sampleRate, ConstrainULong sampleSize, - ConstrainBoolean echoCancellation, + ConstrainBooleanOrDOMString echoCancellation, ConstrainBoolean autoGainControl, ConstrainBoolean noiseSuppression, ConstrainDouble latency, @@ -813,7 +814,7 @@ extension type MediaTrackConstraintSet._(JSObject _) implements JSObject { ConstrainDOMString resizeMode, ConstrainULong sampleRate, ConstrainULong sampleSize, - ConstrainBoolean echoCancellation, + ConstrainBooleanOrDOMString echoCancellation, ConstrainBoolean autoGainControl, ConstrainBoolean noiseSuppression, ConstrainDouble latency, @@ -861,8 +862,8 @@ extension type MediaTrackConstraintSet._(JSObject _) implements JSObject { external set sampleRate(ConstrainULong value); external ConstrainULong get sampleSize; external set sampleSize(ConstrainULong value); - external ConstrainBoolean get echoCancellation; - external set echoCancellation(ConstrainBoolean value); + external ConstrainBooleanOrDOMString get echoCancellation; + external set echoCancellation(ConstrainBooleanOrDOMString value); external ConstrainBoolean get autoGainControl; external set autoGainControl(ConstrainBoolean value); external ConstrainBoolean get noiseSuppression; @@ -949,7 +950,7 @@ extension type MediaTrackSettings._(JSObject _) implements JSObject { String resizeMode, int sampleRate, int sampleSize, - bool echoCancellation, + JSAny echoCancellation, bool autoGainControl, bool noiseSuppression, num latency, @@ -979,6 +980,7 @@ extension type MediaTrackSettings._(JSObject _) implements JSObject { String cursor, bool restrictOwnAudio, bool suppressLocalAudioPlayback, + num screenPixelRatio, }); /// The [MediaTrackSettings] dictionary's **`width`** @@ -1152,8 +1154,8 @@ extension type MediaTrackSettings._(JSObject _) implements JSObject { /// [WebRTC](https://developer.mozilla.org/en-US/docs/Web/API/WebRTC_API) /// [RTCPeerConnection] /// will never include this property. - external bool get echoCancellation; - external set echoCancellation(bool value); + external JSAny get echoCancellation; + external set echoCancellation(JSAny value); /// The [MediaTrackSettings] dictionary's /// **`autoGainControl`** property is a Boolean value whose value @@ -1384,6 +1386,8 @@ extension type MediaTrackSettings._(JSObject _) implements JSObject { /// clearer, and also in sync with the conference video. external bool get suppressLocalAudioPlayback; external set suppressLocalAudioPlayback(bool value); + external double get screenPixelRatio; + external set screenPixelRatio(num value); } /// The **`MediaStreamTrackEvent`** interface of the @@ -1681,3 +1685,15 @@ extension type ConstrainDOMStringParameters._(JSObject _) implements JSObject { external JSAny get ideal; external set ideal(JSAny value); } +extension type ConstrainBooleanOrDOMStringParameters._(JSObject _) + implements JSObject { + external factory ConstrainBooleanOrDOMStringParameters({ + JSAny exact, + JSAny ideal, + }); + + external JSAny get exact; + external set exact(JSAny value); + external JSAny get ideal; + external set ideal(JSAny value); +} diff --git a/web/lib/src/dom/mediastream_recording.dart b/web/lib/src/dom/mediastream_recording.dart index 46e5ce0c..0c85971d 100644 --- a/web/lib/src/dom/mediastream_recording.dart +++ b/web/lib/src/dom/mediastream_recording.dart @@ -261,8 +261,11 @@ extension type BlobEvent._(JSObject _) implements Event, JSObject { /// to be zero. external double get timecode; } -extension type BlobEventInit._(JSObject _) implements JSObject { +extension type BlobEventInit._(JSObject _) implements EventInit, JSObject { external factory BlobEventInit({ + bool bubbles, + bool cancelable, + bool composed, required Blob data, DOMHighResTimeStamp timecode, }); diff --git a/web/lib/src/dom/notifications.dart b/web/lib/src/dom/notifications.dart index b787f209..92a285ac 100644 --- a/web/lib/src/dom/notifications.dart +++ b/web/lib/src/dom/notifications.dart @@ -176,6 +176,7 @@ extension type NotificationOptions._(JSObject _) implements JSObject { NotificationDirection dir, String lang, String body, + String navigate, String tag, String image, String icon, @@ -195,6 +196,8 @@ extension type NotificationOptions._(JSObject _) implements JSObject { external set lang(String value); external String get body; external set body(String value); + external String get navigate; + external set navigate(String value); external String get tag; external set tag(String value); external String get image; @@ -222,6 +225,7 @@ extension type NotificationAction._(JSObject _) implements JSObject { external factory NotificationAction({ required String action, required String title, + String navigate, String icon, }); @@ -229,6 +233,8 @@ extension type NotificationAction._(JSObject _) implements JSObject { external set action(String value); external String get title; external set title(String value); + external String get navigate; + external set navigate(String value); external String get icon; external set icon(String value); } diff --git a/web/lib/src/dom/push_api.dart b/web/lib/src/dom/push_api.dart index 78ee4dd3..8a2ada44 100644 --- a/web/lib/src/dom/push_api.dart +++ b/web/lib/src/dom/push_api.dart @@ -17,6 +17,7 @@ import 'dart:js_interop'; import 'fileapi.dart'; import 'hr_time.dart'; +import 'notifications.dart'; import 'service_workers.dart'; typedef PushMessageDataInit = JSAny; @@ -281,11 +282,14 @@ extension type PushEventInit._(JSObject _) bool bubbles, bool cancelable, bool composed, - PushMessageDataInit data, + PushMessageDataInit? data, + Notification? notification, }); - external PushMessageDataInit get data; - external set data(PushMessageDataInit value); + external PushMessageDataInit? get data; + external set data(PushMessageDataInit? value); + external Notification? get notification; + external set notification(Notification? value); } extension type PushSubscriptionChangeEvent._(JSObject _) implements ExtendableEvent, JSObject { diff --git a/web/lib/src/dom/reporting.dart b/web/lib/src/dom/reporting.dart index dfe6ac13..91f40163 100644 --- a/web/lib/src/dom/reporting.dart +++ b/web/lib/src/dom/reporting.dart @@ -36,9 +36,7 @@ typedef ReportingObserverCallback = JSFunction; /// API documentation sourced from /// [MDN Web Docs](https://developer.mozilla.org/en-US/docs/Web/API/ReportBody). extension type ReportBody._(JSObject _) implements JSObject { - /// The **`toJSON()`** method of the [ReportBody] interface is a _serializer_, - /// and returns a JSON representation of the `ReportBody` object. - external JSObject toJSON(); + ReportBody() : _ = JSObject(); } /// The `Report` interface of the @@ -60,21 +58,28 @@ extension type ReportBody._(JSObject _) implements JSObject { /// API documentation sourced from /// [MDN Web Docs](https://developer.mozilla.org/en-US/docs/Web/API/Report). extension type Report._(JSObject _) implements JSObject { - external JSObject toJSON(); + external factory Report({ + String type, + String url, + ReportBody? body, + }); /// The **`type`** read-only property of the [Report] /// interface returns the type of report generated, e.g. `deprecation` or /// `intervention`. external String get type; + external set type(String value); /// The **`url`** read-only property of the [Report] /// interface returns the URL of the document that generated the report. external String get url; + external set url(String value); /// The **`body`** read-only property of the [Report] /// interface returns the body of the report, which is a `ReportBody` object /// containing the detailed report information. external ReportBody? get body; + external set body(ReportBody? value); } /// The `ReportingObserver` interface of the diff --git a/web/lib/src/dom/saa_non_cookie_storage.dart b/web/lib/src/dom/saa_non_cookie_storage.dart index 1ea233b3..b9512a8c 100644 --- a/web/lib/src/dom/saa_non_cookie_storage.dart +++ b/web/lib/src/dom/saa_non_cookie_storage.dart @@ -91,9 +91,9 @@ extension type StorageAccessHandle._(JSObject _) implements JSObject { extension type SharedWorkerOptions._(JSObject _) implements WorkerOptions, JSObject { external factory SharedWorkerOptions({ + String name, WorkerType type, RequestCredentials credentials, - String name, SameSiteCookiesType sameSiteCookies, }); diff --git a/web/lib/src/dom/screen_capture.dart b/web/lib/src/dom/screen_capture.dart index f5088b33..a3610155 100644 --- a/web/lib/src/dom/screen_capture.dart +++ b/web/lib/src/dom/screen_capture.dart @@ -17,6 +17,7 @@ import 'dart:js_interop'; typedef SelfCapturePreferenceEnum = String; typedef SystemAudioPreferenceEnum = String; +typedef WindowAudioPreferenceEnum = String; typedef SurfaceSwitchingPreferenceEnum = String; typedef MonitorTypeSurfacesEnum = String; extension type DisplayMediaStreamOptions._(JSObject _) implements JSObject { @@ -26,6 +27,7 @@ extension type DisplayMediaStreamOptions._(JSObject _) implements JSObject { JSObject controller, SelfCapturePreferenceEnum selfBrowserSurface, SystemAudioPreferenceEnum systemAudio, + WindowAudioPreferenceEnum windowAudio, SurfaceSwitchingPreferenceEnum surfaceSwitching, MonitorTypeSurfacesEnum monitorTypeSurfaces, }); @@ -40,6 +42,8 @@ extension type DisplayMediaStreamOptions._(JSObject _) implements JSObject { external set selfBrowserSurface(SelfCapturePreferenceEnum value); external SystemAudioPreferenceEnum get systemAudio; external set systemAudio(SystemAudioPreferenceEnum value); + external WindowAudioPreferenceEnum get windowAudio; + external set windowAudio(WindowAudioPreferenceEnum value); external SurfaceSwitchingPreferenceEnum get surfaceSwitching; external set surfaceSwitching(SurfaceSwitchingPreferenceEnum value); external MonitorTypeSurfacesEnum get monitorTypeSurfaces; diff --git a/web/lib/src/dom/secure_payment_confirmation.dart b/web/lib/src/dom/secure_payment_confirmation.dart index 16c6779a..fad80bca 100644 --- a/web/lib/src/dom/secure_payment_confirmation.dart +++ b/web/lib/src/dom/secure_payment_confirmation.dart @@ -16,21 +16,28 @@ library; import 'dart:js_interop'; import 'payment_request.dart'; +import 'webauthn.dart'; extension type AuthenticationExtensionsPaymentInputs._(JSObject _) implements JSObject { external factory AuthenticationExtensionsPaymentInputs({ bool isPayment, + JSArray browserBoundPubKeyCredParams, String rpId, String topOrigin, String payeeName, String payeeOrigin, + JSArray paymentEntitiesLogos, PaymentCurrencyAmount total, PaymentCredentialInstrument instrument, }); external bool get isPayment; external set isPayment(bool value); + external JSArray + get browserBoundPubKeyCredParams; + external set browserBoundPubKeyCredParams( + JSArray value); external String get rpId; external set rpId(String value); external String get topOrigin; @@ -39,16 +46,33 @@ extension type AuthenticationExtensionsPaymentInputs._(JSObject _) external set payeeName(String value); external String get payeeOrigin; external set payeeOrigin(String value); + external JSArray get paymentEntitiesLogos; + external set paymentEntitiesLogos(JSArray value); external PaymentCurrencyAmount get total; external set total(PaymentCurrencyAmount value); external PaymentCredentialInstrument get instrument; external set instrument(PaymentCredentialInstrument value); } +extension type AuthenticationExtensionsPaymentOutputs._(JSObject _) + implements JSObject { + external factory AuthenticationExtensionsPaymentOutputs( + {BrowserBoundSignature browserBoundSignature}); + + external BrowserBoundSignature get browserBoundSignature; + external set browserBoundSignature(BrowserBoundSignature value); +} +extension type BrowserBoundSignature._(JSObject _) implements JSObject { + external factory BrowserBoundSignature({required JSArrayBuffer signature}); + + external JSArrayBuffer get signature; + external set signature(JSArrayBuffer value); +} extension type PaymentCredentialInstrument._(JSObject _) implements JSObject { external factory PaymentCredentialInstrument({ required String displayName, required String icon, bool iconMustBeShown, + String details, }); external String get displayName; @@ -57,4 +81,17 @@ extension type PaymentCredentialInstrument._(JSObject _) implements JSObject { external set icon(String value); external bool get iconMustBeShown; external set iconMustBeShown(bool value); + external String get details; + external set details(String value); +} +extension type PaymentEntityLogo._(JSObject _) implements JSObject { + external factory PaymentEntityLogo({ + required String url, + required String label, + }); + + external String get url; + external set url(String value); + external String get label; + external set label(String value); } diff --git a/web/lib/src/dom/service_workers.dart b/web/lib/src/dom/service_workers.dart index 013269ca..c64c487f 100644 --- a/web/lib/src/dom/service_workers.dart +++ b/web/lib/src/dom/service_workers.dart @@ -16,7 +16,7 @@ library; import 'dart:js_interop'; import 'background_sync.dart'; -import 'cookie_store.dart'; +import 'cookiestore.dart'; import 'dom.dart'; import 'fetch.dart'; import 'html.dart'; @@ -130,7 +130,7 @@ extension type ServiceWorkerRegistration._(JSObject _) /// the worker /// bypasses any browser caches if the previous fetch occurred over 24 hours /// ago. - external JSPromise update(); + external JSPromise update(); /// The **`unregister()`** method of the /// [ServiceWorkerRegistration] interface unregisters the service worker diff --git a/web/lib/src/dom/speech_api.dart b/web/lib/src/dom/speech_api.dart index 1850fc59..17506196 100644 --- a/web/lib/src/dom/speech_api.dart +++ b/web/lib/src/dom/speech_api.dart @@ -64,6 +64,14 @@ extension type SpeechRecognition._(JSObject _) /// [SpeechRecognitionResult]. external void abort(); + /// The **`grammars`** property of the + /// [SpeechRecognition] interface returns and sets a collection of + /// [SpeechGrammar] objects that represent the grammars that will be + /// understood + /// by the current `SpeechRecognition`. + external JSObject get grammars; + external set grammars(JSObject value); + /// The **`lang`** property of the [SpeechRecognition] /// interface returns and sets the language of the current /// `SpeechRecognition`. diff --git a/web/lib/src/dom/svg.dart b/web/lib/src/dom/svg.dart index 88cd7eef..c04bcd76 100644 --- a/web/lib/src/dom/svg.dart +++ b/web/lib/src/dom/svg.dart @@ -322,7 +322,7 @@ extension type SVGElement._(JSObject _) implements Element, JSObject { /// > /// > The `style` property has the same priority in the CSS cascade as an /// > inline style declaration set via the `style` attribute. - external CSSStyleDeclaration get style; + external JSObject get style; /// The **`attributeStyleMap`** read-only property of the [SVGElement] /// interface returns a live [StylePropertyMap] object that contains a list of @@ -1079,8 +1079,8 @@ extension type SVGAnimatedString._(JSObject _) implements JSObject { /// BaseVal gets or sets the base value of the given attribute before any /// animations are applied. The base value of the given attribute before /// applying any animations. Setter throws DOMException. - external String get baseVal; - external set baseVal(String value); + external JSAny get baseVal; + external set baseVal(JSAny value); /// The `animVal` read-only property of the [SVGAnimatedString] interface /// contains the same value as the [SVGAnimatedString.baseVal] property. If @@ -1351,7 +1351,7 @@ extension type SVGSVGElement._(JSObject _) /// the SVG document fragment (i.e., the search is restricted to a subset of /// the document tree) for an [Element] whose `id` property matches the /// specified string. - external Element getElementById(String elementId); + external Element? getElementById(String elementId); external int suspendRedraw(int maxWaitMilliseconds); external void unsuspendRedraw(int suspendHandleID); external void unsuspendRedrawAll(); @@ -1765,6 +1765,15 @@ extension type SVGStyleElement._(JSObject _) implements SVGElement, JSObject { external String get title; external set title(String value); + /// The **`SVGStyleElement.disabled`** property can be used to get and set + /// whether the stylesheet is disabled (`true`) or not (`false`). + /// + /// Note that there is no corresponding `disabled` attribute on the [SVG + /// `