refactor(core): remove testing-only childNodes() and firstChild() fns from DomAdapters (#32291)
PR Close #32291
This commit is contained in:

committed by
Miško Hevery

parent
30dabdf8fc
commit
c0680602f9
@ -142,10 +142,8 @@ export class BrowserDomAdapter extends GenericBrowserDomAdapter {
|
||||
nodeName(node: Node): string { return node.nodeName; }
|
||||
nodeValue(node: Node): string|null { return node.nodeValue; }
|
||||
type(node: HTMLInputElement): string { return node.type; }
|
||||
firstChild(el: Node): Node|null { return el.firstChild; }
|
||||
nextSibling(el: Node): Node|null { return el.nextSibling; }
|
||||
parentElement(el: Node): Node|null { return el.parentNode; }
|
||||
childNodes(el: any): Node[] { return el.childNodes; }
|
||||
clearNodes(el: Node) {
|
||||
while (el.firstChild) {
|
||||
el.removeChild(el.firstChild);
|
||||
|
@ -56,10 +56,8 @@ export abstract class DomAdapter {
|
||||
abstract nodeName(node: any): string;
|
||||
abstract nodeValue(node: any): string|null;
|
||||
abstract type(node: any): string;
|
||||
abstract firstChild(el: any): Node|null;
|
||||
abstract nextSibling(el: any): Node|null;
|
||||
abstract parentElement(el: any): Node|null;
|
||||
abstract childNodes(el: any): Node[];
|
||||
|
||||
// Used by Meta
|
||||
abstract remove(el: any): Node;
|
||||
|
Reference in New Issue
Block a user