refactor(core): Removed readonly getters and changed to readonly (#19842)

variables

PR Close #19842
This commit is contained in:
Yuan Gao
2017-09-15 16:12:02 -07:00
committed by Jason Aden
parent c9ad529afc
commit e544742156
8 changed files with 37 additions and 24 deletions

View File

@ -23,13 +23,12 @@ export class MockScriptElement {
export class MockDocument {
mock: MockScriptElement|null;
readonly body: any = this;
createElement(tag: 'script'): HTMLScriptElement {
return new MockScriptElement() as any as HTMLScriptElement;
}
get body(): any { return this; }
appendChild(node: any): void { this.mock = node; }
removeNode(node: any): void {
@ -41,4 +40,4 @@ export class MockDocument {
mockLoad(): void { this.mock !.listeners.load !(null as any); }
mockError(err: Error) { this.mock !.listeners.error !(err); }
}
}