29 lines
929 B
TypeScript
Raw Normal View History

/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
import {renderComponent} from '@angular/core/src/render3/index';
import {bindAction, profile} from '../../util';
import {LargeTableComponent, createDom, destroyDom} from './table';
function noop() {}
export function main() {
let component: LargeTableComponent;
if (typeof window !== 'undefined') {
component = renderComponent<LargeTableComponent>(LargeTableComponent);
bindAction('#createDom', () => createDom(component));
bindAction('#destroyDom', () => destroyDom(component));
bindAction('#updateDomProfile', profile(() => createDom(component), noop, 'update'));
bindAction(
'#createDomProfile',
profile(() => createDom(component), () => destroyDom(component), 'create'));
}
}