mirror of
https://github.com/angular/angular
synced 2026-05-24 09:28:37 +00:00
Since those are top level APIs, `ngDevMode` might not be available at runtime if they're invoked before the variable is set. fixes #62796 PR Close #63875
20 lines
591 B
TypeScript
20 lines
591 B
TypeScript
/**
|
|
* @license
|
|
* Copyright Google LLC 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.dev/license
|
|
*/
|
|
|
|
import {InjectionToken} from './di';
|
|
|
|
/**
|
|
* A DI Token representing the main rendering context.
|
|
* In a browser and SSR this is the DOM Document.
|
|
* When using SSR, that document is created by [Domino](https://github.com/angular/domino).
|
|
*
|
|
* @publicApi
|
|
*/
|
|
export const DOCUMENT = new InjectionToken<Document>(
|
|
typeof ngDevMode !== undefined && ngDevMode ? 'DocumentToken' : '',
|
|
);
|