Skip to content

Commit 2ea0d16

Browse files
authored
Merge pull request #26171 from Microsoft/portGeneratedLibFiles8-2-2
Port generated lib files
2 parents fefc47f + 613b07f commit 2ea0d16

File tree

3 files changed

+57
-52
lines changed

3 files changed

+57
-52
lines changed

src/lib/dom.generated.d.ts

Lines changed: 46 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -3930,7 +3930,7 @@ interface Document extends Node, NonElementParentNode, DocumentOrShadowRoot, Par
39303930
/**
39313931
* Specifies the beginning and end of the document body.
39323932
*/
3933-
body: HTMLElement | null;
3933+
body: HTMLElement;
39343934
/**
39353935
* Returns document's encoding.
39363936
*/
@@ -4096,6 +4096,7 @@ interface Document extends Node, NonElementParentNode, DocumentOrShadowRoot, Par
40964096
/** @deprecated */
40974097
captureEvents(): void;
40984098
caretPositionFromPoint(x: number, y: number): CaretPosition | null;
4099+
caretRangeFromPoint(x: number, y: number): Range;
40994100
/** @deprecated */
41004101
clear(): void;
41014102
/**
@@ -4320,7 +4321,7 @@ interface Document extends Node, NonElementParentNode, DocumentOrShadowRoot, Par
43204321
* @param filter A custom NodeFilter function to use.
43214322
* @param entityReferenceExpansion A flag that specifies whether entity reference nodes are expanded.
43224323
*/
4323-
createTreeWalker(root: Node, whatToShow?: number, filter?: NodeFilter | null): TreeWalker;
4324+
createTreeWalker(root: Node, whatToShow?: number, filter?: NodeFilter | null, entityReferenceExpansion?: boolean): TreeWalker;
43244325
/**
43254326
* Returns the element for the specified x coordinate and the specified y coordinate.
43264327
* @param x The x-offset
@@ -4363,69 +4364,69 @@ interface Document extends Node, NonElementParentNode, DocumentOrShadowRoot, Par
43634364
getElementsByTagName<K extends keyof HTMLElementTagNameMap>(qualifiedName: K): HTMLCollectionOf<HTMLElementTagNameMap[K]>;
43644365
getElementsByTagName<K extends keyof SVGElementTagNameMap>(qualifiedName: K): HTMLCollectionOf<SVGElementTagNameMap[K]>;
43654366
getElementsByTagName(qualifiedName: string): HTMLCollectionOf<Element>;
4366-
/**
4367-
* Returns a Boolean value that indicates whether the specified command is in the indeterminate state.
4368-
* @param commandId String that specifies a command identifier.
4369-
*/
4370-
queryCommandIndeterm(commandId: string): boolean;
4371-
/**
4372-
* Returns an object representing the current selection of the document that is loaded into the object displaying a webpage.
4367+
/**
4368+
* If namespace and localName are
4369+
* "*" returns a HTMLCollection of all descendant elements.
4370+
* If only namespace is "*" returns a HTMLCollection of all descendant elements whose local name is localName.
4371+
* If only localName is "*" returns a HTMLCollection of all descendant elements whose namespace is namespace.
4372+
* Otherwise, returns a HTMLCollection of all descendant elements whose namespace is namespace and local name is localName.
43734373
*/
4374+
getElementsByTagNameNS(namespaceURI: "http://www.w3.org/1999/xhtml", localName: string): HTMLCollectionOf<HTMLElement>;
4375+
getElementsByTagNameNS(namespaceURI: "http://www.w3.org/2000/svg", localName: string): HTMLCollectionOf<SVGElement>;
4376+
getElementsByTagNameNS(namespaceURI: string, localName: string): HTMLCollectionOf<Element>;
43744377
/**
4375-
* Returns a Boolean value that indicates whether the current command is supported on the current range.
4376-
* @param commandId Specifies a command identifier.
4378+
* Gets a value indicating whether the object currently has focus.
43774379
*/
4378-
queryCommandSupported(commandId: string): boolean;
4380+
hasFocus(): boolean;
4381+
importNode<T extends Node>(importedNode: T, deep: boolean): T;
43794382
/**
4380-
* Returns the current value of the document, range, or current selection for the given command.
4381-
* @param commandId String that specifies a command identifier.
4383+
* 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.
4384+
* @param url Specifies a MIME type for the document.
4385+
* @param name Specifies the name of the window. This name is used as the value for the TARGET attribute on a form or an anchor element.
4386+
* @param features Contains a list of items separated by commas. Each item consists of an option and a value, separated by an equals sign (for example, "fullscreen=yes, toolbar=yes"). The following values are supported.
4387+
* @param replace Specifies whether the existing entry for the document is replaced in the history list.
43824388
*/
4383-
queryCommandValue(commandId: string): string;
4389+
open(url?: string, name?: string, features?: string, replace?: boolean): Document;
43844390
/**
43854391
* Returns a Boolean value that indicates whether a specified command can be successfully executed using execCommand, given the current state of the document.
43864392
* @param commandId Specifies a command identifier.
43874393
*/
43884394
queryCommandEnabled(commandId: string): boolean;
43894395
/**
4390-
* Gets a value indicating whether the object currently has focus.
4396+
* Returns a Boolean value that indicates whether the specified command is in the indeterminate state.
4397+
* @param commandId String that specifies a command identifier.
43914398
*/
4392-
hasFocus(): boolean;
4399+
queryCommandIndeterm(commandId: string): boolean;
43934400
/**
43944401
* Returns a Boolean value that indicates the current state of the command.
43954402
* @param commandId String that specifies a command identifier.
43964403
*/
43974404
queryCommandState(commandId: string): boolean;
43984405
/**
4399-
* Writes one or more HTML expressions, followed by a carriage return, to a document in the specified window.
4400-
* @param content The text and HTML tags to write.
4406+
* Returns a Boolean value that indicates whether the current command is supported on the current range.
4407+
* @param commandId Specifies a command identifier.
44014408
*/
4402-
writeln(...text: string[]): void;
4409+
queryCommandSupported(commandId: string): boolean;
4410+
/**
4411+
* Returns the current value of the document, range, or current selection for the given command.
4412+
* @param commandId String that specifies a command identifier.
4413+
*/
4414+
queryCommandValue(commandId: string): string;
4415+
/** @deprecated */
4416+
releaseEvents(): void;
44034417
/**
44044418
* Writes one or more HTML expressions to a document in the specified window.
44054419
* @param content Specifies the text and HTML tags to write.
44064420
*/
44074421
write(...text: string[]): void;
44084422
/**
4409-
* 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.
4410-
* @param url Specifies a MIME type for the document.
4411-
* @param name Specifies the name of the window. This name is used as the value for the TARGET attribute on a form or an anchor element.
4412-
* @param features Contains a list of items separated by commas. Each item consists of an option and a value, separated by an equals sign (for example, "fullscreen=yes, toolbar=yes"). The following values are supported.
4413-
* @param replace Specifies whether the existing entry for the document is replaced in the history list.
4423+
* Writes one or more HTML expressions, followed by a carriage return, to a document in the specified window.
4424+
* @param content The text and HTML tags to write.
44144425
*/
4415-
open(url?: string, name?: string, features?: string, replace?: boolean): Document;
4416-
/**
4417-
* If namespace and localName are
4418-
* "*" returns a HTMLCollection of all descendant elements.
4419-
* If only namespace is "*" returns a HTMLCollection of all descendant elements whose local name is localName.
4420-
* If only localName is "*" returns a HTMLCollection of all descendant elements whose namespace is namespace.
4421-
* Otherwise, returns a HTMLCollection of all descendant elements whose namespace is namespace and local name is localName.
4426+
writeln(...text: string[]): void;
4427+
/**
4428+
* Returns an object representing the current selection of the document that is loaded into the object displaying a webpage.
44224429
*/
4423-
getElementsByTagNameNS(namespaceURI: "http://www.w3.org/1999/xhtml", localName: string): HTMLCollectionOf<HTMLElement>;
4424-
getElementsByTagNameNS(namespaceURI: "http://www.w3.org/2000/svg", localName: string): HTMLCollectionOf<SVGElement>;
4425-
getElementsByTagNameNS(namespaceURI: string, localName: string): HTMLCollectionOf<Element>;
4426-
importNode<T extends Node>(importedNode: T, deep: boolean): T;
4427-
/** @deprecated */
4428-
releaseEvents(): void;
44294430
addEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
44304431
addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
44314432
removeEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
@@ -4846,6 +4847,7 @@ interface Event {
48464847
*/
48474848
readonly isTrusted: boolean;
48484849
returnValue: boolean;
4850+
readonly srcElement: Element | null;
48494851
/**
48504852
* Returns the object to which event is dispatched (its target).
48514853
*/
@@ -5335,7 +5337,7 @@ interface GlobalEventHandlers {
53355337
* Fires when an error occurs during object loading.
53365338
* @param ev The event.
53375339
*/
5338-
onerror: ((this: GlobalEventHandlers, ev: ErrorEvent) => any) | null;
5340+
onerror: ErrorEventHandler;
53395341
/**
53405342
* Fires when the object receives focus.
53415343
* @param ev The event.
@@ -9282,7 +9284,7 @@ interface Location {
92829284
/**
92839285
* Reloads the current page.
92849286
*/
9285-
reload(): void;
9287+
reload(forcedReload?: boolean): void;
92869288
/**
92879289
* Removes the current page from the session history and navigates to the given URL.
92889290
*/
@@ -10256,6 +10258,7 @@ interface Node extends EventTarget {
1025610258
* Returns the last child.
1025710259
*/
1025810260
readonly lastChild: ChildNode | null;
10261+
readonly namespaceURI: string | null;
1025910262
/**
1026010263
* Returns the next sibling.
1026110264
*/
@@ -10293,7 +10296,7 @@ interface Node extends EventTarget {
1029310296
/**
1029410297
* Returns the parent element.
1029510298
*/
10296-
readonly parentElement: Element | null;
10299+
readonly parentElement: HTMLElement | null;
1029710300
/**
1029810301
* Returns the parent.
1029910302
*/
@@ -17365,7 +17368,7 @@ declare var onended: ((this: Window, ev: Event) => any) | null;
1736517368
* Fires when an error occurs during object loading.
1736617369
* @param ev The event.
1736717370
*/
17368-
declare var onerror: ((this: Window, ev: ErrorEvent) => any) | null;
17371+
declare var onerror: ErrorEventHandler;
1736917372
/**
1737017373
* Fires when the object receives focus.
1737117374
* @param ev The event.
@@ -17623,6 +17626,7 @@ type IDBKeyPath = string;
1762317626
type Transferable = ArrayBuffer | MessagePort | ImageBitmap;
1762417627
type RTCIceGatherCandidate = RTCIceCandidateDictionary | RTCIceCandidateComplete;
1762517628
type RTCTransport = RTCDtlsTransport | RTCSrtpSdesTransport;
17629+
type MouseWheelEvent = WheelEvent;
1762617630
type WindowProxy = Window;
1762717631
type AlignSetting = "start" | "center" | "end" | "left" | "right";
1762817632
type AnimationPlayState = "idle" | "running" | "paused" | "finished";

src/lib/webworker.generated.d.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1019,6 +1019,7 @@ interface Event {
10191019
*/
10201020
readonly isTrusted: boolean;
10211021
returnValue: boolean;
1022+
readonly srcElement: object | null;
10221023
/**
10231024
* Returns the object to which event is dispatched (its target).
10241025
*/

0 commit comments

Comments
 (0)