refactor(platform-browser): Remove setGlobalVar from DOM adapter
This commit is contained in:

committed by
Alex Rickabaugh

parent
d4e196035c
commit
bb2fc6b8da
@ -7,11 +7,10 @@
|
||||
*/
|
||||
|
||||
import {ComponentRef} from '@angular/core';
|
||||
import {getDOM} from '../../dom/dom_adapter';
|
||||
|
||||
import {exportNgVar} from '../../dom/util';
|
||||
import {AngularProfiler} from './common_tools';
|
||||
|
||||
const PROFILER_GLOBAL_NAME = 'ng.profiler';
|
||||
const PROFILER_GLOBAL_NAME = 'profiler';
|
||||
|
||||
/**
|
||||
* Enabled Angular debug tools that are accessible via your browser's
|
||||
@ -27,7 +26,7 @@ const PROFILER_GLOBAL_NAME = 'ng.profiler';
|
||||
* @experimental All debugging apis are currently experimental.
|
||||
*/
|
||||
export function enableDebugTools<T>(ref: ComponentRef<T>): ComponentRef<T> {
|
||||
getDOM().setGlobalVar(PROFILER_GLOBAL_NAME, new AngularProfiler(ref));
|
||||
exportNgVar(PROFILER_GLOBAL_NAME, new AngularProfiler(ref));
|
||||
return ref;
|
||||
}
|
||||
|
||||
@ -37,5 +36,5 @@ export function enableDebugTools<T>(ref: ComponentRef<T>): ComponentRef<T> {
|
||||
* @experimental All debugging apis are currently experimental.
|
||||
*/
|
||||
export function disableDebugTools(): void {
|
||||
getDOM().setGlobalVar(PROFILER_GLOBAL_NAME, null);
|
||||
exportNgVar(PROFILER_GLOBAL_NAME, null);
|
||||
}
|
||||
|
Reference in New Issue
Block a user