Skip to content

Commit 9e20f7f

Browse files
authored
Update Web IDL to 3.49.0 (#266)
Also updates CSS to 6.12.15 and Elements to 2.3.0.
1 parent 50239e9 commit 9e20f7f

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+1217
-194
lines changed

lib/src/dom.dart

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
export 'dom/accelerometer.dart';
66
export 'dom/angle_instanced_arrays.dart';
77
export 'dom/attribution_reporting_api.dart';
8+
export 'dom/background_sync.dart';
89
export 'dom/battery_status.dart';
910
export 'dom/clipboard_apis.dart';
1011
export 'dom/compression.dart';
@@ -15,8 +16,10 @@ export 'dom/csp.dart';
1516
export 'dom/css_animations.dart';
1617
export 'dom/css_animations_2.dart';
1718
export 'dom/css_cascade.dart';
19+
export 'dom/css_cascade_6.dart';
1820
export 'dom/css_conditional.dart';
19-
export 'dom/css_contain_3.dart';
21+
export 'dom/css_conditional_5.dart';
22+
export 'dom/css_contain.dart';
2023
export 'dom/css_counter_styles.dart';
2124
export 'dom/css_font_loading.dart';
2225
export 'dom/css_fonts.dart';
@@ -27,8 +30,11 @@ export 'dom/css_properties_values_api.dart';
2730
export 'dom/css_transitions.dart';
2831
export 'dom/css_transitions_2.dart';
2932
export 'dom/css_typed_om.dart';
33+
export 'dom/css_view_transitions.dart';
34+
export 'dom/css_view_transitions_2.dart';
3035
export 'dom/cssom.dart';
3136
export 'dom/cssom_view.dart';
37+
export 'dom/digital_identities.dart';
3238
export 'dom/dom.dart';
3339
export 'dom/dom_parsing.dart';
3440
export 'dom/encoding.dart';
@@ -73,10 +79,12 @@ export 'dom/media_playback_quality.dart';
7379
export 'dom/media_source.dart';
7480
export 'dom/mediacapture_fromelement.dart';
7581
export 'dom/mediacapture_streams.dart';
82+
export 'dom/mediacapture_transform.dart';
7683
export 'dom/mediasession.dart';
7784
export 'dom/mediastream_recording.dart';
7885
export 'dom/mst_content_hint.dart';
7986
export 'dom/navigation_timing.dart';
87+
export 'dom/netinfo.dart';
8088
export 'dom/notifications.dart';
8189
export 'dom/oes_draw_buffers_indexed.dart';
8290
export 'dom/oes_element_index_uint.dart';
@@ -96,6 +104,7 @@ export 'dom/performance_timeline.dart';
96104
export 'dom/permissions.dart';
97105
export 'dom/picture_in_picture.dart';
98106
export 'dom/pointerevents.dart';
107+
export 'dom/pointerlock.dart';
99108
export 'dom/private_network_access.dart';
100109
export 'dom/push_api.dart';
101110
export 'dom/referrer_policy.dart';
@@ -104,6 +113,8 @@ export 'dom/reporting.dart';
104113
export 'dom/requestidlecallback.dart';
105114
export 'dom/resize_observer.dart';
106115
export 'dom/resource_timing.dart';
116+
export 'dom/saa_non_cookie_storage.dart';
117+
export 'dom/sanitizer_api.dart';
107118
export 'dom/scheduling_apis.dart';
108119
export 'dom/screen_capture.dart';
109120
export 'dom/screen_orientation.dart';

lib/src/dom/background_sync.dart

Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
// Copyright (c) 2024, the Dart project authors. Please see the AUTHORS file
2+
// for details. All rights reserved. Use of this source code is governed by a
3+
// BSD-style license that can be found in the LICENSE file.
4+
//
5+
// API docs from [MDN Web Docs](https://developer.mozilla.org/en-US/docs/Web).
6+
// Attributions and copyright licensing by Mozilla Contributors is licensed
7+
// under [CC-BY-SA 2.5](https://creativecommons.org/licenses/by-sa/2.5/.
8+
9+
// Generated from Web IDL definitions.
10+
11+
@JS()
12+
library;
13+
14+
import 'dart:js_interop';
15+
16+
import 'service_workers.dart';
17+
18+
/// The **`SyncManager`** interface of the [Background Synchronization API]
19+
/// provides an interface for registering and listing sync registrations.
20+
///
21+
/// ---
22+
///
23+
/// API documentation sourced from
24+
/// [MDN Web Docs](https://developer.mozilla.org/en-US/docs/Web/API/SyncManager).
25+
extension type SyncManager._(JSObject _) implements JSObject {
26+
/// The **`register()`** method of the [SyncManager] interface registers a
27+
/// synchronization event, triggering a [ServiceWorkerGlobalScope.sync_event]
28+
/// event inside the associated service worker as soon as network connectivity
29+
/// is available.
30+
external JSPromise<JSAny?> register(String tag);
31+
32+
/// The **`getTags()`** method of the
33+
/// [SyncManager] interface returns a list of developer-defined identifiers
34+
/// for
35+
/// `SyncManager` registrations.
36+
external JSPromise<JSArray<JSString>> getTags();
37+
}
38+
39+
/// @AvailableInWorkers("service")
40+
///
41+
/// The **`SyncEvent`** interface of the [Background Synchronization API]
42+
/// represents a sync action that is dispatched on the
43+
/// [ServiceWorkerGlobalScope] of a ServiceWorker.
44+
///
45+
/// This interface inherits from the [ExtendableEvent] interface.
46+
///
47+
/// ---
48+
///
49+
/// API documentation sourced from
50+
/// [MDN Web Docs](https://developer.mozilla.org/en-US/docs/Web/API/SyncEvent).
51+
extension type SyncEvent._(JSObject _) implements ExtendableEvent, JSObject {
52+
external factory SyncEvent(
53+
String type,
54+
SyncEventInit init,
55+
);
56+
57+
/// @AvailableInWorkers("service")
58+
///
59+
/// The **`tag`** read-only property of the
60+
/// [SyncEvent] interface returns the developer-defined identifier for
61+
/// this `SyncEvent`. This is the value passed in the `tag` parameter
62+
/// of the [SyncEvent.SyncEvent] constructor.
63+
external String get tag;
64+
65+
/// @AvailableInWorkers("service")
66+
///
67+
/// The **`lastChance`** read-only property of the
68+
/// [SyncEvent] interface returns `true` if the user agent will not
69+
/// make further synchronization attempts after the current attempt. This is
70+
/// the value
71+
/// passed in the `lastChance` parameter of the
72+
/// [SyncEvent.SyncEvent] constructor.
73+
external bool get lastChance;
74+
}
75+
extension type SyncEventInit._(JSObject _)
76+
implements ExtendableEventInit, JSObject {
77+
external factory SyncEventInit({
78+
bool bubbles,
79+
bool cancelable,
80+
bool composed,
81+
required String tag,
82+
bool lastChance,
83+
});
84+
85+
external String get tag;
86+
external set tag(String value);
87+
external bool get lastChance;
88+
external set lastChance(bool value);
89+
}

lib/src/dom/clipboard_apis.dart

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,8 @@ extension type ClipboardItem._(JSObject _) implements JSObject {
8383
ClipboardItemOptions options,
8484
]);
8585

86+
external static bool supports(String type);
87+
8688
/// The **`getType()`** method of the [ClipboardItem] interface returns a
8789
/// `Promise` that resolves with a [Blob] of the requested or an error if the
8890
/// MIME type is not found.

lib/src/dom/credential_management.dart

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ library;
1313

1414
import 'dart:js_interop';
1515

16+
import 'digital_identities.dart';
1617
import 'dom.dart';
1718
import 'fedcm.dart';
1819
import 'web_otp.dart';
@@ -147,6 +148,7 @@ extension type CredentialRequestOptions._(JSObject _) implements JSObject {
147148
IdentityCredentialRequestOptions identity,
148149
bool password,
149150
FederatedCredentialRequestOptions federated,
151+
DigitalCredentialRequestOptions digital,
150152
OTPCredentialRequestOptions otp,
151153
PublicKeyCredentialRequestOptions publicKey,
152154
});
@@ -161,19 +163,24 @@ extension type CredentialRequestOptions._(JSObject _) implements JSObject {
161163
external set password(bool value);
162164
external FederatedCredentialRequestOptions get federated;
163165
external set federated(FederatedCredentialRequestOptions value);
166+
external DigitalCredentialRequestOptions get digital;
167+
external set digital(DigitalCredentialRequestOptions value);
164168
external OTPCredentialRequestOptions get otp;
165169
external set otp(OTPCredentialRequestOptions value);
166170
external PublicKeyCredentialRequestOptions get publicKey;
167171
external set publicKey(PublicKeyCredentialRequestOptions value);
168172
}
169173
extension type CredentialCreationOptions._(JSObject _) implements JSObject {
170174
external factory CredentialCreationOptions({
175+
CredentialMediationRequirement mediation,
171176
AbortSignal signal,
172177
PasswordCredentialInit password,
173178
FederatedCredentialInit federated,
174179
PublicKeyCredentialCreationOptions publicKey,
175180
});
176181

182+
external CredentialMediationRequirement get mediation;
183+
external set mediation(CredentialMediationRequirement value);
177184
external AbortSignal get signal;
178185
external set signal(AbortSignal value);
179186
external PasswordCredentialInit get password;

lib/src/dom/csp.dart

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -138,16 +138,16 @@ extension type SecurityPolicyViolationEventInit._(JSObject _)
138138
bool bubbles,
139139
bool cancelable,
140140
bool composed,
141-
required String documentURI,
141+
String documentURI,
142142
String referrer,
143143
String blockedURI,
144-
required String violatedDirective,
145-
required String effectiveDirective,
146-
required String originalPolicy,
144+
String violatedDirective,
145+
String effectiveDirective,
146+
String originalPolicy,
147147
String sourceFile,
148148
String sample,
149-
required SecurityPolicyViolationEventDisposition disposition,
150-
required int statusCode,
149+
SecurityPolicyViolationEventDisposition disposition,
150+
int statusCode,
151151
int lineNumber,
152152
int columnNumber,
153153
});

lib/src/dom/css_animations.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ extension type CSSKeyframeRule._(JSObject _) implements CSSRule, JSObject {
9191
/// [CSSStyleDeclaration] interface for the
9292
/// [declaration block](https://www.w3.org/TR/1998/REC-CSS2-19980512/syndata.html#block)
9393
/// of the [CSSKeyframeRule].
94-
external CSSStyleDeclaration get style;
94+
external JSObject get style;
9595
}
9696

9797
/// The **`CSSKeyframesRule`** interface describes an object representing a

lib/src/dom/css_cascade_6.dart

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
// Copyright (c) 2024, the Dart project authors. Please see the AUTHORS file
2+
// for details. All rights reserved. Use of this source code is governed by a
3+
// BSD-style license that can be found in the LICENSE file.
4+
//
5+
// API docs from [MDN Web Docs](https://developer.mozilla.org/en-US/docs/Web).
6+
// Attributions and copyright licensing by Mozilla Contributors is licensed
7+
// under [CC-BY-SA 2.5](https://creativecommons.org/licenses/by-sa/2.5/.
8+
9+
// Generated from Web IDL definitions.
10+
11+
@JS()
12+
library;
13+
14+
import 'dart:js_interop';
15+
16+
import 'cssom.dart';
17+
18+
/// The **`CSSScopeRule`** interface of the
19+
/// [CSS Object Model](https://developer.mozilla.org/en-US/docs/Web/API/CSS_Object_Model)
20+
/// represents a CSS at-rule.
21+
///
22+
/// ---
23+
///
24+
/// API documentation sourced from
25+
/// [MDN Web Docs](https://developer.mozilla.org/en-US/docs/Web/API/CSSScopeRule).
26+
extension type CSSScopeRule._(JSObject _) implements CSSGroupingRule, JSObject {
27+
/// The **`start`** property of the [CSSScopeRule] interface returns a string
28+
/// containing the value of the `@scope` at-rule's scope root.
29+
external String? get start;
30+
31+
/// The **`end`** property of the [CSSScopeRule] interface returns a string
32+
/// containing the value of the `@scope` at-rule's scope limit.
33+
external String? get end;
34+
}
File renamed without changes.

lib/src/dom/css_contain.dart

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
// Copyright (c) 2024, the Dart project authors. Please see the AUTHORS file
2+
// for details. All rights reserved. Use of this source code is governed by a
3+
// BSD-style license that can be found in the LICENSE file.
4+
//
5+
// API docs from [MDN Web Docs](https://developer.mozilla.org/en-US/docs/Web).
6+
// Attributions and copyright licensing by Mozilla Contributors is licensed
7+
// under [CC-BY-SA 2.5](https://creativecommons.org/licenses/by-sa/2.5/.
8+
9+
// Generated from Web IDL definitions.
10+
11+
@JS()
12+
library;
13+
14+
import 'dart:js_interop';
15+
16+
import 'dom.dart';
17+
18+
/// The **`ContentVisibilityAutoStateChangeEvent`** interface is the event
19+
/// object for the [element.contentvisibilityautostatechange_event] event, which
20+
/// fires on any element with set on it when it starts or stops being
21+
/// [relevant to the user](https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_containment#relevant_to_the_user)
22+
/// and
23+
/// [skipping its contents](https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_containment#skips_its_contents).
24+
///
25+
/// While the element is not relevant (between the start and end events), the
26+
/// user agent skips an element's rendering, including layout and painting.
27+
/// This can significantly improve page rendering speed.
28+
/// The [element.contentvisibilityautostatechange_event] event provides a way
29+
/// for an app's code to also start or stop rendering processes (e.g. drawing on
30+
/// a `canvas`) when they are not needed, thereby conserving processing power.
31+
///
32+
/// Note that even when hidden from view, element contents will remain
33+
/// semantically relevant (e.g. to assistive technology users), so this signal
34+
/// should not be used to skip significant semantic DOM updates.
35+
///
36+
/// ---
37+
///
38+
/// API documentation sourced from
39+
/// [MDN Web Docs](https://developer.mozilla.org/en-US/docs/Web/API/ContentVisibilityAutoStateChangeEvent).
40+
extension type ContentVisibilityAutoStateChangeEvent._(JSObject _)
41+
implements Event, JSObject {
42+
external factory ContentVisibilityAutoStateChangeEvent(
43+
String type, [
44+
ContentVisibilityAutoStateChangeEventInit eventInitDict,
45+
]);
46+
47+
/// The `skipped` read-only property of the
48+
/// [ContentVisibilityAutoStateChangeEvent] interface returns `true` if the
49+
/// user agent [skips the element's
50+
/// contents](/en-US/docs/Web/CSS/CSS_containment#skips_its_contents), or
51+
/// `false` otherwise.
52+
external bool get skipped;
53+
}
54+
extension type ContentVisibilityAutoStateChangeEventInit._(JSObject _)
55+
implements EventInit, JSObject {
56+
external factory ContentVisibilityAutoStateChangeEventInit({
57+
bool bubbles,
58+
bool cancelable,
59+
bool composed,
60+
bool skipped,
61+
});
62+
63+
external bool get skipped;
64+
external set skipped(bool value);
65+
}

lib/src/dom/css_fonts.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ extension type CSSFontFaceRule._(JSObject _) implements CSSRule, JSObject {
2727
/// returns the style information from the
2828
/// [at-rule](https://developer.mozilla.org/en-US/docs/Web/CSS/At-rule). This
2929
/// will be in the form of a [CSSStyleDeclaration] object.
30-
external CSSStyleDeclaration get style;
30+
external JSObject get style;
3131
}
3232

3333
/// The **`CSSFontFeatureValuesRule`** interface represents an

0 commit comments

Comments
 (0)