Skip to content

Commit 2c0a872

Browse files
saschanazsandersn
authored andcommitted
Add HTML Browsing the Web types (#806)
1 parent 253d423 commit 2c0a872

File tree

4 files changed

+73
-1
lines changed

4 files changed

+73
-1
lines changed

baselines/dom.generated.d.ts

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -912,6 +912,10 @@ interface OscillatorOptions extends AudioNodeOptions {
912912
type?: OscillatorType;
913913
}
914914

915+
interface PageTransitionEventInit extends EventInit {
916+
persisted?: boolean;
917+
}
918+
915919
interface PannerOptions extends AudioNodeOptions {
916920
coneInnerAngle?: number;
917921
coneOuterAngle?: number;
@@ -9182,7 +9186,13 @@ declare var HTMLVideoElement: {
91829186

91839187
/** Events that fire when the fragment identifier of the URL has changed. */
91849188
interface HashChangeEvent extends Event {
9189+
/**
9190+
* Returns the URL of the session history entry that is now current.
9191+
*/
91859192
readonly newURL: string;
9193+
/**
9194+
* Returns the URL of the session history entry that was previously current.
9195+
*/
91869196
readonly oldURL: string;
91879197
}
91889198

@@ -11473,12 +11483,25 @@ declare var OverflowEvent: {
1147311483

1147411484
/** The PageTransitionEvent is fired when a document is being loaded or unloaded. */
1147511485
interface PageTransitionEvent extends Event {
11486+
/**
11487+
* For the pageshow event, returns false if the page is newly being loaded (and the load event will fire). Otherwise, returns true.
11488+
*
11489+
* 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.
11490+
*
11491+
* Things that can cause the page to be unsalvageable include:
11492+
*
11493+
* Listening for beforeunload events
11494+
* Listening for unload events
11495+
* Having iframes that are not salvageable
11496+
* Active WebSocket objects
11497+
* Aborting a Document
11498+
*/
1147611499
readonly persisted: boolean;
1147711500
}
1147811501

1147911502
declare var PageTransitionEvent: {
1148011503
prototype: PageTransitionEvent;
11481-
new(): PageTransitionEvent;
11504+
new(type: string, eventInitDict?: PageTransitionEventInit): PageTransitionEvent;
1148211505
};
1148311506

1148411507
/** 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! */
@@ -11975,6 +11998,9 @@ declare var PointerEvent: {
1197511998

1197611999
/** PopStateEvent is an event handler for the popstate event on the window. */
1197712000
interface PopStateEvent extends Event {
12001+
/**
12002+
* Returns a copy of the information that was provided to pushState() or replaceState().
12003+
*/
1197812004
readonly state: any;
1197912005
}
1198012006

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"popstateevent-state": "Returns a copy of the information that was provided to pushState() or replaceState().",
3+
"hashchangeevent-oldurl": "Returns the URL of the session history entry that was previously current.",
4+
"hashchangeevent-newurl": "Returns the URL of the session history entry that is now current.",
5+
"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"
6+
}
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
[Exposed=Window,
2+
Constructor(DOMString type, optional PopStateEventInit eventInitDict = {})]
3+
interface PopStateEvent : Event {
4+
readonly attribute any state;
5+
};
6+
7+
dictionary PopStateEventInit : EventInit {
8+
any state = null;
9+
};
10+
11+
[Exposed=Window,
12+
Constructor(DOMString type, optional HashChangeEventInit eventInitDict = {})]
13+
interface HashChangeEvent : Event {
14+
readonly attribute USVString oldURL;
15+
readonly attribute USVString newURL;
16+
};
17+
18+
dictionary HashChangeEventInit : EventInit {
19+
USVString oldURL = "";
20+
USVString newURL = "";
21+
};
22+
23+
[Exposed=Window,
24+
Constructor(DOMString type, optional PageTransitionEventInit eventInitDict = {})]
25+
interface PageTransitionEvent : Event {
26+
readonly attribute boolean persisted;
27+
};
28+
29+
dictionary PageTransitionEventInit : EventInit {
30+
boolean persisted = false;
31+
};
32+
33+
[Exposed=Window]
34+
interface BeforeUnloadEvent : Event {
35+
attribute DOMString returnValue;
36+
};

inputfiles/idlSources.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -208,6 +208,10 @@
208208
"url": "https://www.w3.org/TR/hr-time-2/",
209209
"title": "High Resolution Time"
210210
},
211+
{
212+
"url": "https://html.spec.whatwg.org/multipage/browsing-the-web.html",
213+
"title": "HTML - Browsing the Web"
214+
},
211215
{
212216
"url": "https://html.spec.whatwg.org/multipage/canvas.html",
213217
"title": "HTML - Canvas"

0 commit comments

Comments
 (0)