refactor(core): remove innerHTML and outerHTML testing utilities from DomAdapters (#32278)

PR Close #32278
This commit is contained in:
Kara Erickson
2019-08-22 14:14:36 -07:00
committed by atscott
parent 25f31f2a14
commit c3f9893d81
12 changed files with 32 additions and 49 deletions

View File

@ -147,11 +147,9 @@ export class BrowserDomAdapter extends GenericBrowserDomAdapter {
isPrevented(evt: Event): boolean {
return evt.defaultPrevented || evt.returnValue != null && !evt.returnValue;
}
getInnerHTML(el: HTMLElement): string { return el.innerHTML; }
getTemplateContent(el: Node): Node|null {
return 'content' in el && this.isTemplateElement(el) ? (<any>el).content : null;
}
getOuterHTML(el: HTMLElement): string { return el.outerHTML; }
nodeName(node: Node): string { return node.nodeName; }
nodeValue(node: Node): string|null { return node.nodeValue; }
type(node: HTMLInputElement): string { return node.type; }

View File

@ -64,10 +64,8 @@ export abstract class DomAdapter {
abstract createEvent(eventType: string): any;
abstract preventDefault(evt: any): any;
abstract isPrevented(evt: any): boolean;
abstract getInnerHTML(el: any): string;
/** Returns content if el is a <template> element, null otherwise. */
abstract getTemplateContent(el: any): any;
abstract getOuterHTML(el: any): string;
abstract nodeName(node: any): string;
abstract nodeValue(node: any): string|null;
abstract type(node: any): string;