diff --git a/baselines/dom.generated.d.ts b/baselines/dom.generated.d.ts index cc5537b24..cba6ae36b 100644 --- a/baselines/dom.generated.d.ts +++ b/baselines/dom.generated.d.ts @@ -912,6 +912,10 @@ interface OscillatorOptions extends AudioNodeOptions { type?: OscillatorType; } +interface PageTransitionEventInit extends EventInit { + persisted?: boolean; +} + interface PannerOptions extends AudioNodeOptions { coneInnerAngle?: number; coneOuterAngle?: number; @@ -9168,7 +9172,13 @@ declare var HTMLVideoElement: { /** Events that fire when the fragment identifier of the URL has changed. */ interface HashChangeEvent extends Event { + /** + * Returns the URL of the session history entry that is now current. + */ readonly newURL: string; + /** + * Returns the URL of the session history entry that was previously current. + */ readonly oldURL: string; } @@ -11463,12 +11473,25 @@ declare var OverflowEvent: { /** The PageTransitionEvent is fired when a document is being loaded or unloaded. */ interface PageTransitionEvent extends Event { + /** + * For the pageshow event, returns false if the page is newly being loaded (and the load event will fire). Otherwise, returns true. + * + * For the pagehide event, returns false if the page is going away for the last time. Otherwise, returns true, meaning that (if nothing conspires to make the page unsalvageable) the page might be reused if the user navigates back to this page. + * + * Things that can cause the page to be unsalvageable include: + * + * Listening for beforeunload events + * Listening for unload events + * Having iframes that are not salvageable + * Active WebSocket objects + * Aborting a Document + */ readonly persisted: boolean; } declare var PageTransitionEvent: { prototype: PageTransitionEvent; - new(): PageTransitionEvent; + new(type: string, eventInitDict?: PageTransitionEventInit): PageTransitionEvent; }; /** A PannerNode always has exactly one input and one output: the input can be mono or stereo but the output is always stereo (2 channels); you can't have panning effects without at least two audio channels! */ @@ -11965,6 +11988,9 @@ declare var PointerEvent: { /** PopStateEvent is an event handler for the popstate event on the window. */ interface PopStateEvent extends Event { + /** + * Returns a copy of the information that was provided to pushState() or replaceState(). + */ readonly state: any; } diff --git a/inputfiles/idl/HTML - Browsing the Web.commentmap.json b/inputfiles/idl/HTML - Browsing the Web.commentmap.json new file mode 100644 index 000000000..23d3990f4 --- /dev/null +++ b/inputfiles/idl/HTML - Browsing the Web.commentmap.json @@ -0,0 +1,6 @@ +{ + "popstateevent-state": "Returns a copy of the information that was provided to pushState() or replaceState().", + "hashchangeevent-oldurl": "Returns the URL of the session history entry that was previously current.", + "hashchangeevent-newurl": "Returns the URL of the session history entry that is now current.", + "pagetransitionevent-persisted": "For the pageshow event, returns false if the page is newly being loaded (and the load event will fire). Otherwise, returns true.\n\nFor the pagehide event, returns false if the page is going away for the last time. Otherwise, returns true, meaning that (if nothing conspires to make the page unsalvageable) the page might be reused if the user navigates back to this page.\n\nThings that can cause the page to be unsalvageable include:\n\nListening for beforeunload events\nListening for unload events\nHaving iframes that are not salvageable\nActive WebSocket objects\nAborting a Document" +} diff --git a/inputfiles/idl/HTML - Browsing the Web.widl b/inputfiles/idl/HTML - Browsing the Web.widl new file mode 100644 index 000000000..768b00d23 --- /dev/null +++ b/inputfiles/idl/HTML - Browsing the Web.widl @@ -0,0 +1,36 @@ +[Exposed=Window, + Constructor(DOMString type, optional PopStateEventInit eventInitDict = {})] +interface PopStateEvent : Event { + readonly attribute any state; +}; + +dictionary PopStateEventInit : EventInit { + any state = null; +}; + +[Exposed=Window, + Constructor(DOMString type, optional HashChangeEventInit eventInitDict = {})] +interface HashChangeEvent : Event { + readonly attribute USVString oldURL; + readonly attribute USVString newURL; +}; + +dictionary HashChangeEventInit : EventInit { + USVString oldURL = ""; + USVString newURL = ""; +}; + +[Exposed=Window, + Constructor(DOMString type, optional PageTransitionEventInit eventInitDict = {})] +interface PageTransitionEvent : Event { + readonly attribute boolean persisted; +}; + +dictionary PageTransitionEventInit : EventInit { + boolean persisted = false; +}; + +[Exposed=Window] +interface BeforeUnloadEvent : Event { + attribute DOMString returnValue; +}; diff --git a/inputfiles/idlSources.json b/inputfiles/idlSources.json index 3eee3c5fe..e143b3810 100644 --- a/inputfiles/idlSources.json +++ b/inputfiles/idlSources.json @@ -212,6 +212,10 @@ "url": "https://www.w3.org/TR/hr-time-2/", "title": "High Resolution Time" }, + { + "url": "https://html.spec.whatwg.org/multipage/browsing-the-web.html", + "title": "HTML - Browsing the Web" + }, { "url": "https://html.spec.whatwg.org/multipage/canvas.html", "title": "HTML - Canvas"