Skip to content

Add FullscreenOptions, etc. #593

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 3 commits into from
Jan 24, 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
20 changes: 18 additions & 2 deletions baselines/dom.generated.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -463,6 +463,10 @@ interface FocusOptions {
preventScroll?: boolean;
}

interface FullscreenOptions {
navigationUI?: FullscreenNavigationUI;
}

interface GainOptions extends AudioNodeOptions {
gain?: number;
}
Expand Down Expand Up @@ -4528,6 +4532,11 @@ interface Document extends Node, NonElementParentNode, DocumentOrShadowRoot, Par
* Gets a value indicating whether the object currently has focus.
*/
hasFocus(): boolean;
/**
* Returns a copy of node. If deep is true, the copy also includes the node's descendants.
* If node is a document or a shadow root, throws a
* "NotSupportedError" DOMException.
*/
importNode<T extends Node>(importedNode: T, deep: boolean): T;
/**
* Opens a new window and loads a document specified by a given URL. Also, opens a new window that uses the url parameter and the name parameter to collect the output of the write method and the writeln method.
Expand Down Expand Up @@ -4913,8 +4922,13 @@ interface Element extends Node, ParentNode, NonDocumentTypeChildNode, ChildNode,
removeAttributeNode(attr: Attr): Attr;
/**
* Displays element fullscreen and resolves promise when done.
* When supplied, options's navigationUI member indicates whether showing
* navigation UI while in fullscreen is preferred or not. If set to "show", navigation
* simplicity is preferred over screen space, and if set to "hide", more screen space
* is preferred. User agents are always free to honor user preference over the application's. The
* default value "auto" indicates no application preference.
*/
requestFullscreen(): Promise<void>;
requestFullscreen(options?: FullscreenOptions): Promise<void>;
requestPointerLock(): void;
scroll(options?: ScrollToOptions): void;
scroll(x: number, y: number): void;
Expand Down Expand Up @@ -17235,7 +17249,8 @@ interface XMLHttpRequest extends XMLHttpRequestEventTarget {
*/
overrideMimeType(mime: string): void;
/**
* Initiates the request. The optional argument provides the request body. The argument is ignored if request method is GET or HEAD.
* Initiates the request. The body argument provides the request body, if any,
* and is ignored if the request method is GET or HEAD.
* Throws an "InvalidStateError" DOMException if either state is not opened or the send() flag is set.
*/
send(body?: Document | BodyInit | null): void;
Expand Down Expand Up @@ -18258,6 +18273,7 @@ type DocumentReadyState = "loading" | "interactive" | "complete";
type EndOfStreamError = "network" | "decode";
type EndingType = "transparent" | "native";
type FillMode = "none" | "forwards" | "backwards" | "both" | "auto";
type FullscreenNavigationUI = "auto" | "show" | "hide";
type GamepadHand = "" | "left" | "right";
type GamepadHapticActuatorType = "vibration";
type GamepadInputEmulationType = "mouse" | "keyboard" | "gamepad";
Expand Down
3 changes: 2 additions & 1 deletion baselines/webworker.generated.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4148,7 +4148,8 @@ interface XMLHttpRequest extends XMLHttpRequestEventTarget {
*/
overrideMimeType(mime: string): void;
/**
* Initiates the request. The optional argument provides the request body. The argument is ignored if request method is GET or HEAD.
* Initiates the request. The body argument provides the request body, if any,
* and is ignored if the request method is GET or HEAD.
* Throws an "InvalidStateError" DOMException if either state is not opened or the send() flag is set.
*/
send(body?: BodyInit | null): void;
Expand Down
2 changes: 1 addition & 1 deletion inputfiles/idl/DOM.commentmap.json
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@
"document-createcdatasection": "Returns a CDATASection node whose data is data.",
"document-createcomment": "Returns a Comment node whose data is data.",
"document-createprocessinginstruction": "Returns a ProcessingInstruction node whose target is target and data is data.\nIf target does not match the Name production an\n\"InvalidCharacterError\" DOMException will be thrown.\nIf data contains \"?>\" an\n\"InvalidCharacterError\" DOMException will be thrown.",
"document-importnode": "",
"document-importnode": "Returns a copy of node. If deep is true, the copy also includes the node's descendants.\nIf node is a document or a shadow root, throws a\n\"NotSupportedError\" DOMException.",
"document-adoptnode": "Moves node from another document and returns it.\nIf node is a document, throws a \"NotSupportedError\" DOMException or, if node is a shadow root, throws a\n\"HierarchyRequestError\" DOMException.",
"documentfragment-documentfragment": "Returns a new DocumentFragment node.",
"element-namespaceuri": "Returns the namespace.",
Expand Down
2 changes: 1 addition & 1 deletion inputfiles/idl/Fullscreen.commentmap.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"element-requestfullscreen": "Displays element fullscreen and resolves promise when done.",
"element-requestfullscreen": "Displays element fullscreen and resolves promise when done.\nWhen supplied, options's navigationUI member indicates whether showing\nnavigation UI while in fullscreen is preferred or not. If set to \"show\", navigation\nsimplicity is preferred over screen space, and if set to \"hide\", more screen space\nis preferred. User agents are always free to honor user preference over the application's. The\ndefault value \"auto\" indicates no application preference.",
"document-fullscreenenabled": "Returns true if document has the ability to display elements fullscreen\nand fullscreen is supported, or false otherwise.",
"document-exitfullscreen": "Stops document's fullscreen element from being displayed fullscreen and\nresolves promise when done.",
"document-fullscreenelement": "Returns shadowroot's fullscreen element."
Expand Down
14 changes: 12 additions & 2 deletions inputfiles/idl/Fullscreen.widl
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
enum FullscreenNavigationUI {
"auto",
"show",
"hide"
};

dictionary FullscreenOptions {
FullscreenNavigationUI navigationUI = "auto";
};

partial interface Element {
Promise<void> requestFullscreen();
Promise<void> requestFullscreen(optional FullscreenOptions options);

attribute EventHandler onfullscreenchange;
attribute EventHandler onfullscreenerror;
Expand All @@ -15,6 +25,6 @@ partial interface Document {
attribute EventHandler onfullscreenerror;
};

partial interface DocumentOrShadowRoot {
partial interface mixin DocumentOrShadowRoot {
[LenientSetter] readonly attribute Element? fullscreenElement;
};
2 changes: 1 addition & 1 deletion inputfiles/idl/XMLHttpRequest.commentmap.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"xmlhttprequest-timeout": "Can be set to a time in milliseconds. When set to a non-zero value will cause fetching to terminate after the given time has passed. When the time has passed, the\nrequest has not yet completed, and the synchronous flag is unset, a timeout event will then be dispatched, or a\n\"TimeoutError\" DOMException will be thrown otherwise (for the send() method).\nWhen set: throws an \"InvalidAccessError\" DOMException if the synchronous flag is set and current global object is a Window object.",
"xmlhttprequest-withcredentials": "True when credentials are to be included in a cross-origin request. False when they are\nto be excluded in a cross-origin request and when cookies are to be ignored in its response.\nInitially false.\nWhen set: throws an \"InvalidStateError\" DOMException if state is not unsent or opened, or if the send() flag is set.",
"xmlhttprequest-upload": "Returns the associated XMLHttpRequestUpload object. It can be used to gather transmission information when data is\ntransferred to a server.",
"xmlhttprequest-send": "Initiates the request. The optional argument provides the request body. The argument is ignored if request method is GET or HEAD.\nThrows an \"InvalidStateError\" DOMException if either state is not opened or the send() flag is set.",
"xmlhttprequest-send": "Initiates the request. The body argument provides the request body, if any,\nand is ignored if the request method is GET or HEAD.\nThrows an \"InvalidStateError\" DOMException if either state is not opened or the send() flag is set.",
"xmlhttprequest-abort": "Cancels any network activity.",
"xmlhttprequest-overridemimetype": "Acts as if the `Content-Type` header value for response is mime.\n(It does not actually change the header though.)\nThrows an \"InvalidStateError\" DOMException if state is loading or done.",
"xmlhttprequest-responsetype": "Returns the response type.\nCan be set to change the response type. Values are:\nthe empty string (default),\n\"arraybuffer\",\n\"blob\",\n\"document\",\n\"json\", and\n\"text\".\nWhen set: setting to \"document\" is ignored if current global object is not a Window object.\nWhen set: throws an \"InvalidStateError\" DOMException if state is loading or done.\nWhen set: throws an \"InvalidAccessError\" DOMException if the synchronous flag is set and current global object is a Window object.",
Expand Down