Skip to content

Commit

Permalink
Update Web IDL to 3.49.0 (#266)
Browse files Browse the repository at this point in the history
Also updates CSS to 6.12.15 and Elements to 2.3.0.
  • Loading branch information
srujzs authored Jun 27, 2024
1 parent 50239e9 commit 9e20f7f
Show file tree
Hide file tree
Showing 41 changed files with 1,217 additions and 194 deletions.
13 changes: 12 additions & 1 deletion lib/src/dom.dart
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
export 'dom/accelerometer.dart';
export 'dom/angle_instanced_arrays.dart';
export 'dom/attribution_reporting_api.dart';
export 'dom/background_sync.dart';
export 'dom/battery_status.dart';
export 'dom/clipboard_apis.dart';
export 'dom/compression.dart';
Expand All @@ -15,8 +16,10 @@ export 'dom/csp.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_conditional.dart';
export 'dom/css_contain_3.dart';
export 'dom/css_conditional_5.dart';
export 'dom/css_contain.dart';
export 'dom/css_counter_styles.dart';
export 'dom/css_font_loading.dart';
export 'dom/css_fonts.dart';
Expand All @@ -27,8 +30,11 @@ export 'dom/css_properties_values_api.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/digital_identities.dart';
export 'dom/dom.dart';
export 'dom/dom_parsing.dart';
export 'dom/encoding.dart';
Expand Down Expand Up @@ -73,10 +79,12 @@ export 'dom/media_playback_quality.dart';
export 'dom/media_source.dart';
export 'dom/mediacapture_fromelement.dart';
export 'dom/mediacapture_streams.dart';
export 'dom/mediacapture_transform.dart';
export 'dom/mediasession.dart';
export 'dom/mediastream_recording.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';
Expand All @@ -96,6 +104,7 @@ export 'dom/performance_timeline.dart';
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';
Expand All @@ -104,6 +113,8 @@ export 'dom/reporting.dart';
export 'dom/requestidlecallback.dart';
export 'dom/resize_observer.dart';
export 'dom/resource_timing.dart';
export 'dom/saa_non_cookie_storage.dart';
export 'dom/sanitizer_api.dart';
export 'dom/scheduling_apis.dart';
export 'dom/screen_capture.dart';
export 'dom/screen_orientation.dart';
Expand Down
89 changes: 89 additions & 0 deletions lib/src/dom/background_sync.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
// 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.

@JS()
library;

import 'dart:js_interop';

import 'service_workers.dart';

/// The **`SyncManager`** interface of the [Background Synchronization API]
/// provides an interface for registering and listing sync registrations.
///
/// ---
///
/// API documentation sourced from
/// [MDN Web Docs](https://developer.mozilla.org/en-US/docs/Web/API/SyncManager).
extension type SyncManager._(JSObject _) implements JSObject {
/// The **`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<JSAny?> register(String tag);

/// The **`getTags()`** method of the
/// [SyncManager] interface returns a list of developer-defined identifiers
/// for
/// `SyncManager` registrations.
external JSPromise<JSArray<JSString>> getTags();
}

/// @AvailableInWorkers("service")
///
/// The **`SyncEvent`** interface of the [Background Synchronization API]
/// represents a sync action that is dispatched on the
/// [ServiceWorkerGlobalScope] of a ServiceWorker.
///
/// This interface inherits from the [ExtendableEvent] interface.
///
/// ---
///
/// API documentation sourced from
/// [MDN Web Docs](https://developer.mozilla.org/en-US/docs/Web/API/SyncEvent).
extension type SyncEvent._(JSObject _) implements ExtendableEvent, JSObject {
external factory SyncEvent(
String type,
SyncEventInit init,
);

/// @AvailableInWorkers("service")
///
/// The **`tag`** read-only property of the
/// [SyncEvent] interface returns the developer-defined identifier for
/// this `SyncEvent`. This is the value passed in the `tag` parameter
/// of the [SyncEvent.SyncEvent] constructor.
external String get tag;

/// @AvailableInWorkers("service")
///
/// The **`lastChance`** read-only property of the
/// [SyncEvent] interface returns `true` if the user agent will not
/// make further synchronization attempts after the current attempt. This is
/// the value
/// passed in the `lastChance` parameter of the
/// [SyncEvent.SyncEvent] constructor.
external bool get lastChance;
}
extension type SyncEventInit._(JSObject _)
implements ExtendableEventInit, JSObject {
external factory SyncEventInit({
bool bubbles,
bool cancelable,
bool composed,
required String tag,
bool lastChance,
});

external String get tag;
external set tag(String value);
external bool get lastChance;
external set lastChance(bool value);
}
2 changes: 2 additions & 0 deletions lib/src/dom/clipboard_apis.dart
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,8 @@ extension type ClipboardItem._(JSObject _) implements JSObject {
ClipboardItemOptions options,
]);

external static bool supports(String type);

/// 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.
Expand Down
7 changes: 7 additions & 0 deletions lib/src/dom/credential_management.dart
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ library;

import 'dart:js_interop';

import 'digital_identities.dart';
import 'dom.dart';
import 'fedcm.dart';
import 'web_otp.dart';
Expand Down Expand Up @@ -147,6 +148,7 @@ extension type CredentialRequestOptions._(JSObject _) implements JSObject {
IdentityCredentialRequestOptions identity,
bool password,
FederatedCredentialRequestOptions federated,
DigitalCredentialRequestOptions digital,
OTPCredentialRequestOptions otp,
PublicKeyCredentialRequestOptions publicKey,
});
Expand All @@ -161,19 +163,24 @@ extension type CredentialRequestOptions._(JSObject _) implements JSObject {
external set password(bool value);
external FederatedCredentialRequestOptions get federated;
external set federated(FederatedCredentialRequestOptions value);
external DigitalCredentialRequestOptions get digital;
external set digital(DigitalCredentialRequestOptions value);
external OTPCredentialRequestOptions get otp;
external set otp(OTPCredentialRequestOptions value);
external PublicKeyCredentialRequestOptions get publicKey;
external set publicKey(PublicKeyCredentialRequestOptions value);
}
extension type CredentialCreationOptions._(JSObject _) implements JSObject {
external factory CredentialCreationOptions({
CredentialMediationRequirement mediation,
AbortSignal signal,
PasswordCredentialInit password,
FederatedCredentialInit federated,
PublicKeyCredentialCreationOptions publicKey,
});

external CredentialMediationRequirement get mediation;
external set mediation(CredentialMediationRequirement value);
external AbortSignal get signal;
external set signal(AbortSignal value);
external PasswordCredentialInit get password;
Expand Down
12 changes: 6 additions & 6 deletions lib/src/dom/csp.dart
Original file line number Diff line number Diff line change
Expand Up @@ -138,16 +138,16 @@ extension type SecurityPolicyViolationEventInit._(JSObject _)
bool bubbles,
bool cancelable,
bool composed,
required String documentURI,
String documentURI,
String referrer,
String blockedURI,
required String violatedDirective,
required String effectiveDirective,
required String originalPolicy,
String violatedDirective,
String effectiveDirective,
String originalPolicy,
String sourceFile,
String sample,
required SecurityPolicyViolationEventDisposition disposition,
required int statusCode,
SecurityPolicyViolationEventDisposition disposition,
int statusCode,
int lineNumber,
int columnNumber,
});
Expand Down
2 changes: 1 addition & 1 deletion lib/src/dom/css_animations.dart
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ extension type CSSKeyframeRule._(JSObject _) implements CSSRule, JSObject {
/// [CSSStyleDeclaration] interface for the
/// [declaration block](https://www.w3.org/TR/1998/REC-CSS2-19980512/syndata.html#block)
/// of the [CSSKeyframeRule].
external CSSStyleDeclaration get style;
external JSObject get style;
}

/// The **`CSSKeyframesRule`** interface describes an object representing a
Expand Down
34 changes: 34 additions & 0 deletions lib/src/dom/css_cascade_6.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
// 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.

@JS()
library;

import 'dart:js_interop';

import 'cssom.dart';

/// The **`CSSScopeRule`** interface of the
/// [CSS Object Model](https://developer.mozilla.org/en-US/docs/Web/API/CSS_Object_Model)
/// represents a CSS at-rule.
///
/// ---
///
/// API documentation sourced from
/// [MDN Web Docs](https://developer.mozilla.org/en-US/docs/Web/API/CSSScopeRule).
extension type CSSScopeRule._(JSObject _) implements CSSGroupingRule, JSObject {
/// The **`start`** property of the [CSSScopeRule] interface returns a string
/// containing the value of the `@scope` at-rule's scope root.
external String? get start;

/// The **`end`** property of the [CSSScopeRule] interface returns a string
/// containing the value of the `@scope` at-rule's scope limit.
external String? get end;
}
File renamed without changes.
65 changes: 65 additions & 0 deletions lib/src/dom/css_contain.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
// 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.

@JS()
library;

import 'dart:js_interop';

import 'dom.dart';

/// The **`ContentVisibilityAutoStateChangeEvent`** interface is the event
/// object for the [element.contentvisibilityautostatechange_event] event, which
/// fires on any element with set on it when it starts or stops being
/// [relevant to the user](https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_containment#relevant_to_the_user)
/// and
/// [skipping its contents](https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_containment#skips_its_contents).
///
/// While the element is not relevant (between the start and end events), the
/// user agent skips an element's rendering, including layout and painting.
/// This can significantly improve page rendering speed.
/// The [element.contentvisibilityautostatechange_event] event provides a way
/// for an app's code to also start or stop rendering processes (e.g. drawing on
/// a `canvas`) when they are not needed, thereby conserving processing power.
///
/// Note that even when hidden from view, element contents will remain
/// semantically relevant (e.g. to assistive technology users), so this signal
/// should not be used to skip significant semantic DOM updates.
///
/// ---
///
/// API documentation sourced from
/// [MDN Web Docs](https://developer.mozilla.org/en-US/docs/Web/API/ContentVisibilityAutoStateChangeEvent).
extension type ContentVisibilityAutoStateChangeEvent._(JSObject _)
implements Event, JSObject {
external factory ContentVisibilityAutoStateChangeEvent(
String type, [
ContentVisibilityAutoStateChangeEventInit eventInitDict,
]);

/// The `skipped` read-only property of the
/// [ContentVisibilityAutoStateChangeEvent] interface returns `true` if the
/// user agent [skips the element's
/// contents](/en-US/docs/Web/CSS/CSS_containment#skips_its_contents), or
/// `false` otherwise.
external bool get skipped;
}
extension type ContentVisibilityAutoStateChangeEventInit._(JSObject _)
implements EventInit, JSObject {
external factory ContentVisibilityAutoStateChangeEventInit({
bool bubbles,
bool cancelable,
bool composed,
bool skipped,
});

external bool get skipped;
external set skipped(bool value);
}
2 changes: 1 addition & 1 deletion lib/src/dom/css_fonts.dart
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ extension type CSSFontFaceRule._(JSObject _) implements CSSRule, JSObject {
/// returns the style information from the
/// [at-rule](https://developer.mozilla.org/en-US/docs/Web/CSS/At-rule). This
/// will be in the form of a [CSSStyleDeclaration] object.
external CSSStyleDeclaration get style;
external JSObject get style;
}

/// The **`CSSFontFeatureValuesRule`** interface represents an
Expand Down
12 changes: 12 additions & 0 deletions lib/src/dom/css_transitions_2.dart
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,20 @@ library;

import 'dart:js_interop';

import 'cssom.dart';
import 'web_animations.dart';

/// The **`CSSStartingStyleRule`** interface of the
/// [CSS Object Model](https://developer.mozilla.org/en-US/docs/Web/API/CSS_Object_Model)
/// represents a CSS at-rule.
///
/// ---
///
/// API documentation sourced from
/// [MDN Web Docs](https://developer.mozilla.org/en-US/docs/Web/API/CSSStartingStyleRule).
extension type CSSStartingStyleRule._(JSObject _)
implements CSSGroupingRule, JSObject {}

/// The **`CSSTransition`** interface of the [Web Animations API] represents an
/// [Animation] object used for a
/// [CSS Transition](https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_transitions).
Expand Down
Loading

0 comments on commit 9e20f7f

Please sign in to comment.