Skip to content

Commit 2b99182

Browse files
committed
add FullscreenOptions, etc.
1 parent 5239b24 commit 2b99182

File tree

6 files changed

+34
-7
lines changed

6 files changed

+34
-7
lines changed

baselines/dom.generated.d.ts

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -459,6 +459,10 @@ interface FocusOptions {
459459
preventScroll?: boolean;
460460
}
461461

462+
interface FullscreenOptions {
463+
navigationUI?: FullscreenNavigationUI;
464+
}
465+
462466
interface GainOptions extends AudioNodeOptions {
463467
gain?: number;
464468
}
@@ -4386,6 +4390,11 @@ interface Document extends Node, NonElementParentNode, DocumentOrShadowRoot, Par
43864390
* Gets a value indicating whether the object currently has focus.
43874391
*/
43884392
hasFocus(): boolean;
4393+
/**
4394+
* Returns a copy of node. If deep is true, the copy also includes the node's descendants.
4395+
* If node is a document or a shadow root, throws a
4396+
* "NotSupportedError" DOMException.
4397+
*/
43894398
importNode<T extends Node>(importedNode: T, deep: boolean): T;
43904399
/**
43914400
* 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.
@@ -4766,8 +4775,13 @@ interface Element extends Node, ParentNode, NonDocumentTypeChildNode, ChildNode,
47664775
removeAttributeNode(attr: Attr): Attr;
47674776
/**
47684777
* Displays element fullscreen and resolves promise when done.
4778+
* When supplied, options's navigationUI member indicates whether showing
4779+
* navigation UI while in fullscreen is preferred or not. If set to "show", navigation
4780+
* simplicity is preferred over screen space, and if set to "hide", more screen space
4781+
* is preferred. User agents are always free to honor user preference over the application's. The
4782+
* default value "auto" indicates no application preference.
47694783
*/
4770-
requestFullscreen(): Promise<void>;
4784+
requestFullscreen(options?: FullscreenOptions): Promise<void>;
47714785
scroll(options?: ScrollToOptions): void;
47724786
scroll(x: number, y: number): void;
47734787
scrollBy(options?: ScrollToOptions): void;
@@ -16706,7 +16720,8 @@ interface XMLHttpRequest extends XMLHttpRequestEventTarget {
1670616720
*/
1670716721
overrideMimeType(mime: string): void;
1670816722
/**
16709-
* Initiates the request. The optional argument provides the request body. The argument is ignored if request method is GET or HEAD.
16723+
* Initiates the request. The body argument provides the request body, if any,
16724+
* and is ignored if the request method is GET or HEAD.
1671016725
* Throws an "InvalidStateError" DOMException if either state is not opened or the send() flag is set.
1671116726
*/
1671216727
send(body?: Document | BodyInit | null): void;
@@ -17696,6 +17711,7 @@ type DocumentReadyState = "loading" | "interactive" | "complete";
1769617711
type EndOfStreamError = "network" | "decode";
1769717712
type EndingType = "transparent" | "native";
1769817713
type FillMode = "none" | "forwards" | "backwards" | "both" | "auto";
17714+
type FullscreenNavigationUI = "auto" | "show" | "hide";
1769917715
type GamepadHand = "" | "left" | "right";
1770017716
type GamepadHapticActuatorType = "vibration";
1770117717
type GamepadInputEmulationType = "mouse" | "keyboard" | "gamepad";

baselines/webworker.generated.d.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2837,7 +2837,8 @@ interface XMLHttpRequest extends XMLHttpRequestEventTarget {
28372837
*/
28382838
overrideMimeType(mime: string): void;
28392839
/**
2840-
* Initiates the request. The optional argument provides the request body. The argument is ignored if request method is GET or HEAD.
2840+
* Initiates the request. The body argument provides the request body, if any,
2841+
* and is ignored if the request method is GET or HEAD.
28412842
* Throws an "InvalidStateError" DOMException if either state is not opened or the send() flag is set.
28422843
*/
28432844
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: 11 additions & 1 deletion
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;

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)