refactor(core): remove testing-only childNodes() and firstChild() fns from DomAdapters (#32291)

PR Close #32291
This commit is contained in:
Kara Erickson
2019-08-24 08:01:24 -07:00
committed by Miško Hevery
parent 30dabdf8fc
commit c0680602f9
17 changed files with 45 additions and 53 deletions

View File

@ -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);

View File

@ -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;