@@ -48,6 +48,8 @@ typedef (HTMLScriptElement or SVGScriptElement) HTMLOrSVGScriptElement;
48
48
49
49
[LegacyOverrideBuiltIns]
50
50
partial interface Document {
51
+ static Document parseHTMLUnsafe((TrustedHTML or DOMString) html);
52
+
51
53
// resource metadata management
52
54
[PutForwards=href, LegacyUnforgeable] readonly attribute Location? location;
53
55
attribute USVString domain;
@@ -75,8 +77,8 @@ partial interface Document {
75
77
[CEReactions] Document open(optional DOMString unused1, optional DOMString unused2); // both arguments are ignored
76
78
WindowProxy? open(USVString url, DOMString name, DOMString features);
77
79
[CEReactions] undefined close();
78
- [CEReactions] undefined write(DOMString... text);
79
- [CEReactions] undefined writeln(DOMString... text);
80
+ [CEReactions] undefined write((TrustedHTML or DOMString) ... text);
81
+ [CEReactions] undefined writeln((TrustedHTML or DOMString) ... text);
80
82
81
83
// user interaction
82
84
readonly attribute WindowProxy? defaultView;
@@ -121,6 +123,7 @@ interface HTMLElement : Element {
121
123
readonly attribute DOMString accessKeyLabel;
122
124
[CEReactions] attribute boolean draggable;
123
125
[CEReactions] attribute boolean spellcheck;
126
+ [CEReactions] attribute DOMString writingSuggestions;
124
127
[CEReactions] attribute DOMString autocapitalize;
125
128
126
129
[CEReactions] attribute [LegacyNullToEmptyString] DOMString innerText;
@@ -449,7 +452,7 @@ interface HTMLIFrameElement : HTMLElement {
449
452
[HTMLConstructor] constructor();
450
453
451
454
[CEReactions] attribute USVString src;
452
- [CEReactions] attribute DOMString srcdoc;
455
+ [CEReactions] attribute (TrustedHTML or DOMString) srcdoc;
453
456
[CEReactions] attribute DOMString name;
454
457
[SameObject, PutForwards=value] readonly attribute DOMTokenList sandbox;
455
458
[CEReactions] attribute DOMString allow;
@@ -999,6 +1002,8 @@ interface HTMLSelectElement : HTMLElement {
999
1002
boolean reportValidity();
1000
1003
undefined setCustomValidity(DOMString error);
1001
1004
1005
+ undefined showPicker();
1006
+
1002
1007
readonly attribute NodeList labels;
1003
1008
};
1004
1009
@@ -1196,6 +1201,7 @@ dictionary FormDataEventInit : EventInit {
1196
1201
interface HTMLDetailsElement : HTMLElement {
1197
1202
[HTMLConstructor] constructor();
1198
1203
1204
+ [CEReactions] attribute DOMString name;
1199
1205
[CEReactions] attribute boolean open;
1200
1206
};
1201
1207
@@ -1236,6 +1242,10 @@ interface HTMLTemplateElement : HTMLElement {
1236
1242
[HTMLConstructor] constructor();
1237
1243
1238
1244
readonly attribute DocumentFragment content;
1245
+ [CEReactions] attribute DOMString shadowRootMode;
1246
+ [CEReactions] attribute boolean shadowRootDelegatesFocus;
1247
+ [CEReactions] attribute boolean shadowRootClonable;
1248
+ [CEReactions] attribute boolean shadowRootSerializable;
1239
1249
};
1240
1250
1241
1251
[Exposed=Window]
@@ -1570,7 +1580,6 @@ interface OffscreenCanvas : EventTarget {
1570
1580
1571
1581
[Exposed=(Window,Worker)]
1572
1582
interface OffscreenCanvasRenderingContext2D {
1573
- undefined commit();
1574
1583
readonly attribute OffscreenCanvas canvas;
1575
1584
};
1576
1585
@@ -1626,6 +1635,9 @@ interface ElementInternals {
1626
1635
boolean reportValidity();
1627
1636
1628
1637
readonly attribute NodeList labels;
1638
+
1639
+ // Custom state pseudo-class
1640
+ [SameObject] readonly attribute CustomStateSet states;
1629
1641
};
1630
1642
1631
1643
// Accessibility semantics
@@ -1644,6 +1656,11 @@ dictionary ValidityStateFlags {
1644
1656
boolean customError = false;
1645
1657
};
1646
1658
1659
+ [Exposed=Window]
1660
+ interface CustomStateSet {
1661
+ setlike<DOMString>;
1662
+ };
1663
+
1647
1664
[Exposed=(Window)]
1648
1665
interface VisibilityStateEntry : PerformanceEntry {
1649
1666
readonly attribute DOMString name; // shadows inherited name
@@ -1686,6 +1703,22 @@ interface mixin ElementContentEditable {
1686
1703
[CEReactions] attribute DOMString inputMode;
1687
1704
};
1688
1705
1706
+ [Exposed=Window]
1707
+ interface CloseWatcher : EventTarget {
1708
+ constructor(optional CloseWatcherOptions options = {});
1709
+
1710
+ undefined requestClose();
1711
+ undefined close();
1712
+ undefined destroy();
1713
+
1714
+ attribute EventHandler oncancel;
1715
+ attribute EventHandler onclose;
1716
+ };
1717
+
1718
+ dictionary CloseWatcherOptions {
1719
+ AbortSignal signal;
1720
+ };
1721
+
1689
1722
[Exposed=Window]
1690
1723
interface DataTransfer {
1691
1724
constructor();
@@ -1849,6 +1882,7 @@ interface Navigation : EventTarget {
1849
1882
readonly attribute NavigationHistoryEntry? currentEntry;
1850
1883
undefined updateCurrentEntry(NavigationUpdateCurrentEntryOptions options);
1851
1884
readonly attribute NavigationTransition? transition;
1885
+ readonly attribute NavigationActivation? activation;
1852
1886
1853
1887
readonly attribute boolean canGoBack;
1854
1888
readonly attribute boolean canGoForward;
@@ -1921,6 +1955,13 @@ interface NavigationTransition {
1921
1955
readonly attribute Promise<undefined> finished;
1922
1956
};
1923
1957
1958
+ [Exposed=Window]
1959
+ interface NavigationActivation {
1960
+ readonly attribute NavigationHistoryEntry? from;
1961
+ readonly attribute NavigationHistoryEntry entry;
1962
+ readonly attribute NavigationType navigationType;
1963
+ };
1964
+
1924
1965
[Exposed=Window]
1925
1966
interface NavigateEvent : Event {
1926
1967
constructor(DOMString type, NavigateEventInit eventInitDict);
@@ -2021,6 +2062,28 @@ dictionary HashChangeEventInit : EventInit {
2021
2062
USVString newURL = "";
2022
2063
};
2023
2064
2065
+ [Exposed=Window]
2066
+ interface PageSwapEvent : Event {
2067
+ constructor(DOMString type, optional PageSwapEventInit eventInitDict = {});
2068
+ readonly attribute NavigationActivation? activation;
2069
+ readonly attribute ViewTransition? viewTransition;
2070
+ };
2071
+
2072
+ dictionary PageSwapEventInit : EventInit {
2073
+ NavigationActivation? activation = null;
2074
+ ViewTransition? viewTransition = null;
2075
+ };
2076
+
2077
+ [Exposed=Window]
2078
+ interface PageRevealEvent : Event {
2079
+ constructor(DOMString type, optional PageRevealEventInit eventInitDict = {});
2080
+ readonly attribute ViewTransition? viewTransition;
2081
+ };
2082
+
2083
+ dictionary PageRevealEventInit : EventInit {
2084
+ ViewTransition? viewTransition = null;
2085
+ };
2086
+
2024
2087
[Exposed=Window]
2025
2088
interface PageTransitionEvent : Event {
2026
2089
constructor(DOMString type, optional PageTransitionEventInit eventInitDict = {});
@@ -2037,6 +2100,23 @@ interface BeforeUnloadEvent : Event {
2037
2100
attribute DOMString returnValue;
2038
2101
};
2039
2102
2103
+ [Exposed=Window]
2104
+ interface NotRestoredReasonDetails {
2105
+ readonly attribute DOMString reason;
2106
+ [Default] object toJSON();
2107
+ };
2108
+
2109
+ [Exposed=Window]
2110
+ interface NotRestoredReasons {
2111
+ readonly attribute DOMString? src;
2112
+ readonly attribute DOMString? id;
2113
+ readonly attribute DOMString? name;
2114
+ readonly attribute DOMString? url;
2115
+ readonly attribute FrozenArray<NotRestoredReasonDetails>? reasons;
2116
+ readonly attribute FrozenArray<NotRestoredReasons>? children;
2117
+ [Default] object toJSON();
2118
+ };
2119
+
2040
2120
[Exposed=*]
2041
2121
interface ErrorEvent : Event {
2042
2122
constructor(DOMString type, optional ErrorEventInit eventInitDict = {});
@@ -2060,12 +2140,12 @@ dictionary ErrorEventInit : EventInit {
2060
2140
interface PromiseRejectionEvent : Event {
2061
2141
constructor(DOMString type, PromiseRejectionEventInit eventInitDict);
2062
2142
2063
- readonly attribute Promise<any> promise;
2143
+ readonly attribute object promise;
2064
2144
readonly attribute any reason;
2065
2145
};
2066
2146
2067
2147
dictionary PromiseRejectionEventInit : EventInit {
2068
- required Promise<any> promise;
2148
+ required object promise;
2069
2149
any reason;
2070
2150
};
2071
2151
@@ -2170,15 +2250,17 @@ interface mixin WindowEventHandlers {
2170
2250
attribute EventHandler onoffline;
2171
2251
attribute EventHandler ononline;
2172
2252
attribute EventHandler onpagehide;
2253
+ attribute EventHandler onpagereveal;
2173
2254
attribute EventHandler onpageshow;
2255
+ attribute EventHandler onpageswap;
2174
2256
attribute EventHandler onpopstate;
2175
2257
attribute EventHandler onrejectionhandled;
2176
2258
attribute EventHandler onstorage;
2177
2259
attribute EventHandler onunhandledrejection;
2178
2260
attribute EventHandler onunload;
2179
2261
};
2180
2262
2181
- typedef (DOMString or Function) TimerHandler;
2263
+ typedef (DOMString or Function or TrustedScript ) TimerHandler;
2182
2264
2183
2265
interface mixin WindowOrWorkerGlobalScope {
2184
2266
[Replaceable] readonly attribute USVString origin;
@@ -2210,11 +2292,32 @@ interface mixin WindowOrWorkerGlobalScope {
2210
2292
Window includes WindowOrWorkerGlobalScope;
2211
2293
WorkerGlobalScope includes WindowOrWorkerGlobalScope;
2212
2294
2295
+ partial interface Element {
2296
+ [CEReactions] undefined setHTMLUnsafe((TrustedHTML or DOMString) html);
2297
+ DOMString getHTML(optional GetHTMLOptions options = {});
2298
+
2299
+ [CEReactions] attribute (TrustedHTML or [LegacyNullToEmptyString] DOMString) innerHTML;
2300
+ [CEReactions] attribute (TrustedHTML or [LegacyNullToEmptyString] DOMString) outerHTML;
2301
+ [CEReactions] undefined insertAdjacentHTML(DOMString position, (TrustedHTML or DOMString) string);
2302
+ };
2303
+
2304
+ partial interface ShadowRoot {
2305
+ [CEReactions] undefined setHTMLUnsafe((TrustedHTML or DOMString) html);
2306
+ DOMString getHTML(optional GetHTMLOptions options = {});
2307
+
2308
+ [CEReactions] attribute (TrustedHTML or [LegacyNullToEmptyString] DOMString) innerHTML;
2309
+ };
2310
+
2311
+ dictionary GetHTMLOptions {
2312
+ boolean serializableShadowRoots = false;
2313
+ sequence<ShadowRoot> shadowRoots = [];
2314
+ };
2315
+
2213
2316
[Exposed=Window]
2214
2317
interface DOMParser {
2215
2318
constructor();
2216
2319
2217
- [NewObject] Document parseFromString(DOMString string, DOMParserSupportedType type);
2320
+ [NewObject] Document parseFromString((TrustedHTML or DOMString) string, DOMParserSupportedType type);
2218
2321
};
2219
2322
2220
2323
enum DOMParserSupportedType {
@@ -2225,6 +2328,10 @@ enum DOMParserSupportedType {
2225
2328
"image/svg+xml"
2226
2329
};
2227
2330
2331
+ partial interface Range {
2332
+ [CEReactions, NewObject] DocumentFragment createContextualFragment((TrustedHTML or DOMString) string);
2333
+ };
2334
+
2228
2335
[Exposed=Window]
2229
2336
interface Navigator {
2230
2337
// objects implementing this interface also implement the interfaces given below
@@ -2414,6 +2521,7 @@ interface MessagePort : EventTarget {
2414
2521
// event handlers
2415
2522
attribute EventHandler onmessage;
2416
2523
attribute EventHandler onmessageerror;
2524
+ attribute EventHandler onclose;
2417
2525
};
2418
2526
2419
2527
dictionary StructuredSerializeOptions {
@@ -2436,7 +2544,7 @@ interface WorkerGlobalScope : EventTarget {
2436
2544
readonly attribute WorkerGlobalScope self;
2437
2545
readonly attribute WorkerLocation location;
2438
2546
readonly attribute WorkerNavigator navigator;
2439
- undefined importScripts(USVString... urls);
2547
+ undefined importScripts((TrustedScriptURL or USVString) ... urls);
2440
2548
2441
2549
attribute OnErrorEventHandler onerror;
2442
2550
attribute EventHandler onlanguagechange;
@@ -2474,7 +2582,7 @@ interface mixin AbstractWorker {
2474
2582
2475
2583
[Exposed=(Window,DedicatedWorker,SharedWorker)]
2476
2584
interface Worker : EventTarget {
2477
- constructor(USVString scriptURL, optional WorkerOptions options = {});
2585
+ constructor((TrustedScriptURL or USVString) scriptURL, optional WorkerOptions options = {});
2478
2586
2479
2587
undefined terminate();
2480
2588
@@ -2496,7 +2604,7 @@ Worker includes AbstractWorker;
2496
2604
2497
2605
[Exposed=Window]
2498
2606
interface SharedWorker : EventTarget {
2499
- constructor(USVString scriptURL, optional (DOMString or WorkerOptions) options = {});
2607
+ constructor((TrustedScriptURL or USVString) scriptURL, optional (DOMString or WorkerOptions) options = {});
2500
2608
2501
2609
readonly attribute MessagePort port;
2502
2610
};
0 commit comments