Skip to content

Commit 4f4bb4a

Browse files
author
Orta Therox
authored
Merge pull request #1116 from microsoft/restore-HTMLDocument-constructor
Restore HTMLDocument constructor
2 parents 0c6014b + 7663b8f commit 4f4bb4a

File tree

3 files changed

+7
-11
lines changed

3 files changed

+7
-11
lines changed

baselines/dom.generated.d.ts

+6-2
Original file line numberDiff line numberDiff line change
@@ -6044,6 +6044,12 @@ interface HTMLDocument extends Document {
60446044
removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
60456045
}
60466046

6047+
/** @deprecated */
6048+
declare var HTMLDocument: {
6049+
prototype: HTMLDocument;
6050+
new(): HTMLDocument;
6051+
};
6052+
60476053
interface HTMLElementEventMap extends ElementEventMap, DocumentAndElementEventHandlersEventMap, GlobalEventHandlersEventMap {
60486054
}
60496055

@@ -16000,7 +16006,6 @@ interface WindowEventMap extends GlobalEventHandlersEventMap, WindowEventHandler
1600016006

1600116007
/** A window containing a DOM document; the document property points to the DOM document loaded in that window. */
1600216008
interface Window extends EventTarget, AnimationFrameProvider, GlobalEventHandlers, WindowEventHandlers, WindowLocalStorage, WindowOrWorkerGlobalScope, WindowSessionStorage {
16003-
HTMLDocument: Document;
1600416009
/** @deprecated This is a legacy alias of `navigator`. */
1600516010
readonly clientInformation: Navigator;
1600616011
/** Returns true if the window has been closed, false otherwise. */
@@ -17035,7 +17040,6 @@ declare var Image: {
1703517040
declare var Option: {
1703617041
new(text?: string, value?: string, defaultSelected?: boolean, selected?: boolean): HTMLOptionElement;
1703717042
};
17038-
declare var HTMLDocument: Document;
1703917043
/** @deprecated This is a legacy alias of `navigator`. */
1704017044
declare var clientInformation: Navigator;
1704117045
/** Returns true if the window has been closed, false otherwise. */

inputfiles/addedTypes.jsonc

-9
Original file line numberDiff line numberDiff line change
@@ -330,7 +330,6 @@
330330
"HTMLDocument": {
331331
"name": "HTMLDocument",
332332
"extends": "Document",
333-
"noInterfaceObject": true,
334333
"deprecated": "use Document",
335334
"exposed": "Window"
336335
},
@@ -366,14 +365,6 @@
366365
}
367366
}
368367
},
369-
"properties": {
370-
"property": {
371-
"HTMLDocument": {
372-
"name": "HTMLDocument",
373-
"type": "Document"
374-
}
375-
}
376-
},
377368
"overrideIndexSignatures": [
378369
"[index: number]: Window"
379370
],

unittests/files/htmldocument.ts

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
document instanceof HTMLDocument

0 commit comments

Comments
 (0)