Add HTMLElement-returning getElementById to DocumentFragment (#1071)

This is copying what `document.getElementById` and `document.body.ownerDocument` currently looks like.

Regressed by b598925.
This commit is contained in:
Kagami Sascha Rosylight 2021-07-17 02:23:56 +02:00 коммит произвёл GitHub
Родитель 2daa98661d
Коммит 0f4a1bd311
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
2 изменённых файлов: 23 добавлений и 0 удалений

2
baselines/dom.generated.d.ts поставляемый
Просмотреть файл

@ -4724,6 +4724,8 @@ interface DocumentAndElementEventHandlers {
/** A minimal document object that has no parent. It is used as a lightweight version of Document that stores a segment of a document structure comprised of nodes just like a standard document. The key difference is that because the document fragment isn't part of the active document tree structure, changes made to the fragment don't affect the document, cause reflow, or incur any performance impact that can occur when changes are made. */
interface DocumentFragment extends Node, NonElementParentNode, ParentNode {
readonly ownerDocument: Document;
getElementById(elementId: string): HTMLElement | null;
}
declare var DocumentFragment: {

Просмотреть файл

@ -655,6 +655,27 @@
}
}
},
"DocumentFragment": {
"methods": {
"method": {
"getElementById": {
"name": "getElementById",
"overrideSignatures": [
"getElementById(elementId: string): HTMLElement | null"
]
}
}
},
"properties": {
"property": {
"ownerDocument": {
"name": "ownerDocument",
"readonly": 1,
"type": "Document"
}
}
}
},
"Node": {
"name": "Node",
"methods": {