From 5fbc7d92c2869c989bb7472f268a11eadf9bd073 Mon Sep 17 00:00:00 2001 From: Mohamed Hegazy Date: Thu, 2 Aug 2018 14:44:17 -0700 Subject: [PATCH] Port generated lib files --- src/lib/dom.generated.d.ts | 116 ++++++++++++++++--------------- src/lib/webworker.generated.d.ts | 1 + 2 files changed, 61 insertions(+), 56 deletions(-) diff --git a/src/lib/dom.generated.d.ts b/src/lib/dom.generated.d.ts index dcf752531e2..2746b0466d9 100644 --- a/src/lib/dom.generated.d.ts +++ b/src/lib/dom.generated.d.ts @@ -3930,7 +3930,7 @@ interface Document extends Node, NonElementParentNode, DocumentOrShadowRoot, Par /** * Specifies the beginning and end of the document body. */ - body: HTMLElement | null; + body: HTMLElement; /** * Returns document's encoding. */ @@ -4096,6 +4096,7 @@ interface Document extends Node, NonElementParentNode, DocumentOrShadowRoot, Par /** @deprecated */ captureEvents(): void; caretPositionFromPoint(x: number, y: number): CaretPosition | null; + caretRangeFromPoint(x: number, y: number): Range; /** @deprecated */ clear(): void; /** @@ -4320,7 +4321,7 @@ interface Document extends Node, NonElementParentNode, DocumentOrShadowRoot, Par * @param filter A custom NodeFilter function to use. * @param entityReferenceExpansion A flag that specifies whether entity reference nodes are expanded. */ - createTreeWalker(root: Node, whatToShow?: number, filter?: NodeFilter | null): TreeWalker; + createTreeWalker(root: Node, whatToShow?: number, filter?: NodeFilter | null, entityReferenceExpansion?: boolean): TreeWalker; /** * Returns the element for the specified x coordinate and the specified y coordinate. * @param x The x-offset @@ -4363,56 +4364,6 @@ interface Document extends Node, NonElementParentNode, DocumentOrShadowRoot, Par getElementsByTagName(qualifiedName: K): HTMLCollectionOf; getElementsByTagName(qualifiedName: K): HTMLCollectionOf; getElementsByTagName(qualifiedName: string): HTMLCollectionOf; - /** - * Returns a Boolean value that indicates whether the specified command is in the indeterminate state. - * @param commandId String that specifies a command identifier. - */ - queryCommandIndeterm(commandId: string): boolean; - /** - * Returns an object representing the current selection of the document that is loaded into the object displaying a webpage. - */ - /** - * Returns a Boolean value that indicates whether the current command is supported on the current range. - * @param commandId Specifies a command identifier. - */ - queryCommandSupported(commandId: string): boolean; - /** - * Returns the current value of the document, range, or current selection for the given command. - * @param commandId String that specifies a command identifier. - */ - queryCommandValue(commandId: string): string; - /** - * Returns a Boolean value that indicates whether a specified command can be successfully executed using execCommand, given the current state of the document. - * @param commandId Specifies a command identifier. - */ - queryCommandEnabled(commandId: string): boolean; - /** - * Gets a value indicating whether the object currently has focus. - */ - hasFocus(): boolean; - /** - * Returns a Boolean value that indicates the current state of the command. - * @param commandId String that specifies a command identifier. - */ - queryCommandState(commandId: string): boolean; - /** - * Writes one or more HTML expressions, followed by a carriage return, to a document in the specified window. - * @param content The text and HTML tags to write. - */ - writeln(...text: string[]): void; - /** - * Writes one or more HTML expressions to a document in the specified window. - * @param content Specifies the text and HTML tags to write. - */ - write(...text: string[]): void; - /** - * 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. - * @param url Specifies a MIME type for the document. - * @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. - * @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. - * @param replace Specifies whether the existing entry for the document is replaced in the history list. - */ - open(url?: string, name?: string, features?: string, replace?: boolean): Document; /** * If namespace and localName are * "*" returns a HTMLCollection of all descendant elements. @@ -4423,9 +4374,59 @@ interface Document extends Node, NonElementParentNode, DocumentOrShadowRoot, Par getElementsByTagNameNS(namespaceURI: "http://www.w3.org/1999/xhtml", localName: string): HTMLCollectionOf; getElementsByTagNameNS(namespaceURI: "http://www.w3.org/2000/svg", localName: string): HTMLCollectionOf; getElementsByTagNameNS(namespaceURI: string, localName: string): HTMLCollectionOf; + /** + * Gets a value indicating whether the object currently has focus. + */ + hasFocus(): boolean; importNode(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. + * @param url Specifies a MIME type for the document. + * @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. + * @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. + * @param replace Specifies whether the existing entry for the document is replaced in the history list. + */ + open(url?: string, name?: string, features?: string, replace?: boolean): Document; + /** + * Returns a Boolean value that indicates whether a specified command can be successfully executed using execCommand, given the current state of the document. + * @param commandId Specifies a command identifier. + */ + queryCommandEnabled(commandId: string): boolean; + /** + * Returns a Boolean value that indicates whether the specified command is in the indeterminate state. + * @param commandId String that specifies a command identifier. + */ + queryCommandIndeterm(commandId: string): boolean; + /** + * Returns a Boolean value that indicates the current state of the command. + * @param commandId String that specifies a command identifier. + */ + queryCommandState(commandId: string): boolean; + /** + * Returns a Boolean value that indicates whether the current command is supported on the current range. + * @param commandId Specifies a command identifier. + */ + queryCommandSupported(commandId: string): boolean; + /** + * Returns the current value of the document, range, or current selection for the given command. + * @param commandId String that specifies a command identifier. + */ + queryCommandValue(commandId: string): string; /** @deprecated */ releaseEvents(): void; + /** + * Writes one or more HTML expressions to a document in the specified window. + * @param content Specifies the text and HTML tags to write. + */ + write(...text: string[]): void; + /** + * Writes one or more HTML expressions, followed by a carriage return, to a document in the specified window. + * @param content The text and HTML tags to write. + */ + writeln(...text: string[]): void; + /** + * Returns an object representing the current selection of the document that is loaded into the object displaying a webpage. + */ addEventListener(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void; removeEventListener(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | EventListenerOptions): void; @@ -4846,6 +4847,7 @@ interface Event { */ readonly isTrusted: boolean; returnValue: boolean; + readonly srcElement: Element | null; /** * Returns the object to which event is dispatched (its target). */ @@ -5335,7 +5337,7 @@ interface GlobalEventHandlers { * Fires when an error occurs during object loading. * @param ev The event. */ - onerror: ((this: GlobalEventHandlers, ev: ErrorEvent) => any) | null; + onerror: ErrorEventHandler; /** * Fires when the object receives focus. * @param ev The event. @@ -9282,7 +9284,7 @@ interface Location { /** * Reloads the current page. */ - reload(): void; + reload(forcedReload?: boolean): void; /** * Removes the current page from the session history and navigates to the given URL. */ @@ -10256,6 +10258,7 @@ interface Node extends EventTarget { * Returns the last child. */ readonly lastChild: ChildNode | null; + readonly namespaceURI: string | null; /** * Returns the next sibling. */ @@ -10293,7 +10296,7 @@ interface Node extends EventTarget { /** * Returns the parent element. */ - readonly parentElement: Element | null; + readonly parentElement: HTMLElement | null; /** * Returns the parent. */ @@ -17365,7 +17368,7 @@ declare var onended: ((this: Window, ev: Event) => any) | null; * Fires when an error occurs during object loading. * @param ev The event. */ -declare var onerror: ((this: Window, ev: ErrorEvent) => any) | null; +declare var onerror: ErrorEventHandler; /** * Fires when the object receives focus. * @param ev The event. @@ -17623,6 +17626,7 @@ type IDBKeyPath = string; type Transferable = ArrayBuffer | MessagePort | ImageBitmap; type RTCIceGatherCandidate = RTCIceCandidateDictionary | RTCIceCandidateComplete; type RTCTransport = RTCDtlsTransport | RTCSrtpSdesTransport; +type MouseWheelEvent = WheelEvent; type WindowProxy = Window; type AlignSetting = "start" | "center" | "end" | "left" | "right"; type AnimationPlayState = "idle" | "running" | "paused" | "finished"; diff --git a/src/lib/webworker.generated.d.ts b/src/lib/webworker.generated.d.ts index 305c6eec0c3..16e5d85d20b 100644 --- a/src/lib/webworker.generated.d.ts +++ b/src/lib/webworker.generated.d.ts @@ -1019,6 +1019,7 @@ interface Event { */ readonly isTrusted: boolean; returnValue: boolean; + readonly srcElement: object | null; /** * Returns the object to which event is dispatched (its target). */