Skip to content

Add HTML Browsing the Web types #806

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Dec 31, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 27 additions & 1 deletion baselines/dom.generated.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -912,6 +912,10 @@ interface OscillatorOptions extends AudioNodeOptions {
type?: OscillatorType;
}

interface PageTransitionEventInit extends EventInit {
persisted?: boolean;
}

interface PannerOptions extends AudioNodeOptions {
coneInnerAngle?: number;
coneOuterAngle?: number;
Expand Down Expand Up @@ -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;
}

Expand Down Expand Up @@ -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! */
Expand Down Expand Up @@ -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;
}

Expand Down
6 changes: 6 additions & 0 deletions inputfiles/idl/HTML - Browsing the Web.commentmap.json
Original file line number Diff line number Diff line change
@@ -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"
}
36 changes: 36 additions & 0 deletions inputfiles/idl/HTML - Browsing the Web.widl
Original file line number Diff line number Diff line change
@@ -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;
};
4 changes: 4 additions & 0 deletions inputfiles/idlSources.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down