Skip to content

Commit d4492af

Browse files
authored
Merge pull request #593 from saschanaz/fullscreenoptions
Add FullscreenOptions, etc.
2 parents aefa61c + 3437f71 commit d4492af

6 files changed

+35
-8
lines changed

baselines/dom.generated.d.ts

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -463,6 +463,10 @@ interface FocusOptions {
463463
preventScroll?: boolean;
464464
}
465465

466+
interface FullscreenOptions {
467+
navigationUI?: FullscreenNavigationUI;
468+
}
469+
466470
interface GainOptions extends AudioNodeOptions {
467471
gain?: number;
468472
}
@@ -4528,6 +4532,11 @@ interface Document extends Node, NonElementParentNode, DocumentOrShadowRoot, Par
45284532
* Gets a value indicating whether the object currently has focus.
45294533
*/
45304534
hasFocus(): boolean;
4535+
/**
4536+
* Returns a copy of node. If deep is true, the copy also includes the node's descendants.
4537+
* If node is a document or a shadow root, throws a
4538+
* "NotSupportedError" DOMException.
4539+
*/
45314540
importNode<T extends Node>(importedNode: T, deep: boolean): T;
45324541
/**
45334542
* 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.
@@ -4913,8 +4922,13 @@ interface Element extends Node, ParentNode, NonDocumentTypeChildNode, ChildNode,
49134922
removeAttributeNode(attr: Attr): Attr;
49144923
/**
49154924
* Displays element fullscreen and resolves promise when done.
4925+
* When supplied, options's navigationUI member indicates whether showing
4926+
* navigation UI while in fullscreen is preferred or not. If set to "show", navigation
4927+
* simplicity is preferred over screen space, and if set to "hide", more screen space
4928+
* is preferred. User agents are always free to honor user preference over the application's. The
4929+
* default value "auto" indicates no application preference.
49164930
*/
4917-
requestFullscreen(): Promise<void>;
4931+
requestFullscreen(options?: FullscreenOptions): Promise<void>;
49184932
requestPointerLock(): void;
49194933
scroll(options?: ScrollToOptions): void;
49204934
scroll(x: number, y: number): void;
@@ -17235,7 +17249,8 @@ interface XMLHttpRequest extends XMLHttpRequestEventTarget {
1723517249
*/
1723617250
overrideMimeType(mime: string): void;
1723717251
/**
17238-
* Initiates the request. The optional argument provides the request body. The argument is ignored if request method is GET or HEAD.
17252+
* Initiates the request. The body argument provides the request body, if any,
17253+
* and is ignored if the request method is GET or HEAD.
1723917254
* Throws an "InvalidStateError" DOMException if either state is not opened or the send() flag is set.
1724017255
*/
1724117256
send(body?: Document | BodyInit | null): void;
@@ -18258,6 +18273,7 @@ type DocumentReadyState = "loading" | "interactive" | "complete";
1825818273
type EndOfStreamError = "network" | "decode";
1825918274
type EndingType = "transparent" | "native";
1826018275
type FillMode = "none" | "forwards" | "backwards" | "both" | "auto";
18276+
type FullscreenNavigationUI = "auto" | "show" | "hide";
1826118277
type GamepadHand = "" | "left" | "right";
1826218278
type GamepadHapticActuatorType = "vibration";
1826318279
type GamepadInputEmulationType = "mouse" | "keyboard" | "gamepad";

baselines/webworker.generated.d.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4148,7 +4148,8 @@ interface XMLHttpRequest extends XMLHttpRequestEventTarget {
41484148
*/
41494149
overrideMimeType(mime: string): void;
41504150
/**
4151-
* Initiates the request. The optional argument provides the request body. The argument is ignored if request method is GET or HEAD.
4151+
* Initiates the request. The body argument provides the request body, if any,
4152+
* and is ignored if the request method is GET or HEAD.
41524153
* Throws an "InvalidStateError" DOMException if either state is not opened or the send() flag is set.
41534154
*/
41544155
send(body?: BodyInit | null): void;

inputfiles/idl/DOM.commentmap.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@
7979
"document-createcdatasection": "Returns a CDATASection node whose data is data.",
8080
"document-createcomment": "Returns a Comment node whose data is data.",
8181
"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.",
82-
"document-importnode": "",
82+
"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.",
8383
"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.",
8484
"documentfragment-documentfragment": "Returns a new DocumentFragment node.",
8585
"element-namespaceuri": "Returns the namespace.",

inputfiles/idl/Fullscreen.commentmap.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"element-requestfullscreen": "Displays element fullscreen and resolves promise when done.",
2+
"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.",
33
"document-fullscreenenabled": "Returns true if document has the ability to display elements fullscreen\nand fullscreen is supported, or false otherwise.",
44
"document-exitfullscreen": "Stops document's fullscreen element from being displayed fullscreen and\nresolves promise when done.",
55
"document-fullscreenelement": "Returns shadowroot's fullscreen element."

inputfiles/idl/Fullscreen.widl

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,15 @@
1+
enum FullscreenNavigationUI {
2+
"auto",
3+
"show",
4+
"hide"
5+
};
6+
7+
dictionary FullscreenOptions {
8+
FullscreenNavigationUI navigationUI = "auto";
9+
};
10+
111
partial interface Element {
2-
Promise<void> requestFullscreen();
12+
Promise<void> requestFullscreen(optional FullscreenOptions options);
313

414
attribute EventHandler onfullscreenchange;
515
attribute EventHandler onfullscreenerror;
@@ -15,6 +25,6 @@ partial interface Document {
1525
attribute EventHandler onfullscreenerror;
1626
};
1727

18-
partial interface DocumentOrShadowRoot {
28+
partial interface mixin DocumentOrShadowRoot {
1929
[LenientSetter] readonly attribute Element? fullscreenElement;
2030
};

inputfiles/idl/XMLHttpRequest.commentmap.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"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.",
77
"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.",
88
"xmlhttprequest-upload": "Returns the associated XMLHttpRequestUpload object. It can be used to gather transmission information when data is\ntransferred to a server.",
9-
"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.",
9+
"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.",
1010
"xmlhttprequest-abort": "Cancels any network activity.",
1111
"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.",
1212
"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.",

0 commit comments

Comments
 (0)