@@ -48,6 +48,8 @@ typedef (HTMLScriptElement or SVGScriptElement) HTMLOrSVGScriptElement;
4848
4949[LegacyOverrideBuiltIns]
5050partial interface Document {
51+ static Document parseHTMLUnsafe((TrustedHTML or DOMString) html);
52+
5153 // resource metadata management
5254 [PutForwards=href, LegacyUnforgeable] readonly attribute Location? location;
5355 attribute USVString domain;
@@ -75,8 +77,8 @@ partial interface Document {
7577 [CEReactions] Document open(optional DOMString unused1, optional DOMString unused2); // both arguments are ignored
7678 WindowProxy? open(USVString url, DOMString name, DOMString features);
7779 [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);
8082
8183 // user interaction
8284 readonly attribute WindowProxy? defaultView;
@@ -121,6 +123,7 @@ interface HTMLElement : Element {
121123 readonly attribute DOMString accessKeyLabel;
122124 [CEReactions] attribute boolean draggable;
123125 [CEReactions] attribute boolean spellcheck;
126+ [CEReactions] attribute DOMString writingSuggestions;
124127 [CEReactions] attribute DOMString autocapitalize;
125128
126129 [CEReactions] attribute [LegacyNullToEmptyString] DOMString innerText;
@@ -449,7 +452,7 @@ interface HTMLIFrameElement : HTMLElement {
449452 [HTMLConstructor] constructor();
450453
451454 [CEReactions] attribute USVString src;
452- [CEReactions] attribute DOMString srcdoc;
455+ [CEReactions] attribute (TrustedHTML or DOMString) srcdoc;
453456 [CEReactions] attribute DOMString name;
454457 [SameObject, PutForwards=value] readonly attribute DOMTokenList sandbox;
455458 [CEReactions] attribute DOMString allow;
@@ -999,6 +1002,8 @@ interface HTMLSelectElement : HTMLElement {
9991002 boolean reportValidity();
10001003 undefined setCustomValidity(DOMString error);
10011004
1005+ undefined showPicker();
1006+
10021007 readonly attribute NodeList labels;
10031008};
10041009
@@ -1196,6 +1201,7 @@ dictionary FormDataEventInit : EventInit {
11961201interface HTMLDetailsElement : HTMLElement {
11971202 [HTMLConstructor] constructor();
11981203
1204+ [CEReactions] attribute DOMString name;
11991205 [CEReactions] attribute boolean open;
12001206};
12011207
@@ -1236,6 +1242,10 @@ interface HTMLTemplateElement : HTMLElement {
12361242 [HTMLConstructor] constructor();
12371243
12381244 readonly attribute DocumentFragment content;
1245+ [CEReactions] attribute DOMString shadowRootMode;
1246+ [CEReactions] attribute boolean shadowRootDelegatesFocus;
1247+ [CEReactions] attribute boolean shadowRootClonable;
1248+ [CEReactions] attribute boolean shadowRootSerializable;
12391249};
12401250
12411251[Exposed=Window]
@@ -1570,7 +1580,6 @@ interface OffscreenCanvas : EventTarget {
15701580
15711581[Exposed=(Window,Worker)]
15721582interface OffscreenCanvasRenderingContext2D {
1573- undefined commit();
15741583 readonly attribute OffscreenCanvas canvas;
15751584};
15761585
@@ -1626,6 +1635,9 @@ interface ElementInternals {
16261635 boolean reportValidity();
16271636
16281637 readonly attribute NodeList labels;
1638+
1639+ // Custom state pseudo-class
1640+ [SameObject] readonly attribute CustomStateSet states;
16291641};
16301642
16311643// Accessibility semantics
@@ -1644,6 +1656,11 @@ dictionary ValidityStateFlags {
16441656 boolean customError = false;
16451657};
16461658
1659+ [Exposed=Window]
1660+ interface CustomStateSet {
1661+ setlike<DOMString>;
1662+ };
1663+
16471664[Exposed=(Window)]
16481665interface VisibilityStateEntry : PerformanceEntry {
16491666 readonly attribute DOMString name; // shadows inherited name
@@ -1686,6 +1703,22 @@ interface mixin ElementContentEditable {
16861703 [CEReactions] attribute DOMString inputMode;
16871704};
16881705
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+
16891722[Exposed=Window]
16901723interface DataTransfer {
16911724 constructor();
@@ -1849,6 +1882,7 @@ interface Navigation : EventTarget {
18491882 readonly attribute NavigationHistoryEntry? currentEntry;
18501883 undefined updateCurrentEntry(NavigationUpdateCurrentEntryOptions options);
18511884 readonly attribute NavigationTransition? transition;
1885+ readonly attribute NavigationActivation? activation;
18521886
18531887 readonly attribute boolean canGoBack;
18541888 readonly attribute boolean canGoForward;
@@ -1921,6 +1955,13 @@ interface NavigationTransition {
19211955 readonly attribute Promise<undefined> finished;
19221956};
19231957
1958+ [Exposed=Window]
1959+ interface NavigationActivation {
1960+ readonly attribute NavigationHistoryEntry? from;
1961+ readonly attribute NavigationHistoryEntry entry;
1962+ readonly attribute NavigationType navigationType;
1963+ };
1964+
19241965[Exposed=Window]
19251966interface NavigateEvent : Event {
19261967 constructor(DOMString type, NavigateEventInit eventInitDict);
@@ -2021,6 +2062,28 @@ dictionary HashChangeEventInit : EventInit {
20212062 USVString newURL = "";
20222063};
20232064
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+
20242087[Exposed=Window]
20252088interface PageTransitionEvent : Event {
20262089 constructor(DOMString type, optional PageTransitionEventInit eventInitDict = {});
@@ -2037,6 +2100,23 @@ interface BeforeUnloadEvent : Event {
20372100 attribute DOMString returnValue;
20382101};
20392102
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+
20402120[Exposed=*]
20412121interface ErrorEvent : Event {
20422122 constructor(DOMString type, optional ErrorEventInit eventInitDict = {});
@@ -2060,12 +2140,12 @@ dictionary ErrorEventInit : EventInit {
20602140interface PromiseRejectionEvent : Event {
20612141 constructor(DOMString type, PromiseRejectionEventInit eventInitDict);
20622142
2063- readonly attribute Promise<any> promise;
2143+ readonly attribute object promise;
20642144 readonly attribute any reason;
20652145};
20662146
20672147dictionary PromiseRejectionEventInit : EventInit {
2068- required Promise<any> promise;
2148+ required object promise;
20692149 any reason;
20702150};
20712151
@@ -2170,15 +2250,17 @@ interface mixin WindowEventHandlers {
21702250 attribute EventHandler onoffline;
21712251 attribute EventHandler ononline;
21722252 attribute EventHandler onpagehide;
2253+ attribute EventHandler onpagereveal;
21732254 attribute EventHandler onpageshow;
2255+ attribute EventHandler onpageswap;
21742256 attribute EventHandler onpopstate;
21752257 attribute EventHandler onrejectionhandled;
21762258 attribute EventHandler onstorage;
21772259 attribute EventHandler onunhandledrejection;
21782260 attribute EventHandler onunload;
21792261};
21802262
2181- typedef (DOMString or Function) TimerHandler;
2263+ typedef (DOMString or Function or TrustedScript ) TimerHandler;
21822264
21832265interface mixin WindowOrWorkerGlobalScope {
21842266 [Replaceable] readonly attribute USVString origin;
@@ -2210,11 +2292,32 @@ interface mixin WindowOrWorkerGlobalScope {
22102292Window includes WindowOrWorkerGlobalScope;
22112293WorkerGlobalScope includes WindowOrWorkerGlobalScope;
22122294
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+
22132316[Exposed=Window]
22142317interface DOMParser {
22152318 constructor();
22162319
2217- [NewObject] Document parseFromString(DOMString string, DOMParserSupportedType type);
2320+ [NewObject] Document parseFromString((TrustedHTML or DOMString) string, DOMParserSupportedType type);
22182321};
22192322
22202323enum DOMParserSupportedType {
@@ -2225,6 +2328,10 @@ enum DOMParserSupportedType {
22252328 "image/svg+xml"
22262329};
22272330
2331+ partial interface Range {
2332+ [CEReactions, NewObject] DocumentFragment createContextualFragment((TrustedHTML or DOMString) string);
2333+ };
2334+
22282335[Exposed=Window]
22292336interface Navigator {
22302337 // objects implementing this interface also implement the interfaces given below
@@ -2414,6 +2521,7 @@ interface MessagePort : EventTarget {
24142521 // event handlers
24152522 attribute EventHandler onmessage;
24162523 attribute EventHandler onmessageerror;
2524+ attribute EventHandler onclose;
24172525};
24182526
24192527dictionary StructuredSerializeOptions {
@@ -2436,7 +2544,7 @@ interface WorkerGlobalScope : EventTarget {
24362544 readonly attribute WorkerGlobalScope self;
24372545 readonly attribute WorkerLocation location;
24382546 readonly attribute WorkerNavigator navigator;
2439- undefined importScripts(USVString... urls);
2547+ undefined importScripts((TrustedScriptURL or USVString) ... urls);
24402548
24412549 attribute OnErrorEventHandler onerror;
24422550 attribute EventHandler onlanguagechange;
@@ -2474,7 +2582,7 @@ interface mixin AbstractWorker {
24742582
24752583[Exposed=(Window,DedicatedWorker,SharedWorker)]
24762584interface Worker : EventTarget {
2477- constructor(USVString scriptURL, optional WorkerOptions options = {});
2585+ constructor((TrustedScriptURL or USVString) scriptURL, optional WorkerOptions options = {});
24782586
24792587 undefined terminate();
24802588
@@ -2496,7 +2604,7 @@ Worker includes AbstractWorker;
24962604
24972605[Exposed=Window]
24982606interface SharedWorker : EventTarget {
2499- constructor(USVString scriptURL, optional (DOMString or WorkerOptions) options = {});
2607+ constructor((TrustedScriptURL or USVString) scriptURL, optional (DOMString or WorkerOptions) options = {});
25002608
25012609 readonly attribute MessagePort port;
25022610};
0 commit comments