Skip to content

Commit e65dd92

Browse files
committed
add FullscreenOptions, etc.
1 parent ae27ec9 commit e65dd92

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
}
@@ -4469,6 +4473,11 @@ interface Document extends Node, NonElementParentNode, DocumentOrShadowRoot, Par
44694473
* Gets a value indicating whether the object currently has focus.
44704474
*/
44714475
hasFocus(): boolean;
4476+
/**
4477+
* Returns a copy of node. If deep is true, the copy also includes the node's descendants.
4478+
* If node is a document or a shadow root, throws a
4479+
* "NotSupportedError" DOMException.
4480+
*/
44724481
importNode<T extends Node>(importedNode: T, deep: boolean): T;
44734482
/**
44744483
* 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.
@@ -4845,8 +4854,13 @@ interface Element extends Node, ParentNode, NonDocumentTypeChildNode, ChildNode,
48454854
removeAttributeNode(attr: Attr): Attr;
48464855
/**
48474856
* Displays element fullscreen and resolves promise when done.
4857+
* When supplied, options's navigationUI member indicates whether showing
4858+
* navigation UI while in fullscreen is preferred or not. If set to "show", navigation
4859+
* simplicity is preferred over screen space, and if set to "hide", more screen space
4860+
* is preferred. User agents are always free to honor user preference over the application's. The
4861+
* default value "auto" indicates no application preference.
48484862
*/
4849-
requestFullscreen(): Promise<void>;
4863+
requestFullscreen(options?: FullscreenOptions): Promise<void>;
48504864
scroll(options?: ScrollToOptions): void;
48514865
scroll(x: number, y: number): void;
48524866
scrollBy(options?: ScrollToOptions): void;
@@ -16767,7 +16781,8 @@ interface XMLHttpRequest extends XMLHttpRequestEventTarget {
1676716781
*/
1676816782
overrideMimeType(mime: string): void;
1676916783
/**
16770-
* Initiates the request. The optional argument provides the request body. The argument is ignored if request method is GET or HEAD.
16784+
* Initiates the request. The body argument provides the request body, if any,
16785+
* and is ignored if the request method is GET or HEAD.
1677116786
* Throws an "InvalidStateError" DOMException if either state is not opened or the send() flag is set.
1677216787
*/
1677316788
send(body?: Document | BodyInit | null): void;
@@ -17757,6 +17772,7 @@ type DocumentReadyState = "loading" | "interactive" | "complete";
1775717772
type EndOfStreamError = "network" | "decode";
1775817773
type EndingType = "transparent" | "native";
1775917774
type FillMode = "none" | "forwards" | "backwards" | "both" | "auto";
17775+
type FullscreenNavigationUI = "auto" | "show" | "hide";
1776017776
type GamepadHand = "" | "left" | "right";
1776117777
type GamepadHapticActuatorType = "vibration";
1776217778
type GamepadInputEmulationType = "mouse" | "keyboard" | "gamepad";

baselines/webworker.generated.d.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3888,7 +3888,8 @@ interface XMLHttpRequest extends XMLHttpRequestEventTarget {
38883888
*/
38893889
overrideMimeType(mime: string): void;
38903890
/**
3891-
* Initiates the request. The optional argument provides the request body. The argument is ignored if request method is GET or HEAD.
3891+
* Initiates the request. The body argument provides the request body, if any,
3892+
* and is ignored if the request method is GET or HEAD.
38923893
* Throws an "InvalidStateError" DOMException if either state is not opened or the send() flag is set.
38933894
*/
38943895
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)