From 3a9d2473ca1b5a5ef7595bcb58fb52b1677be76f Mon Sep 17 00:00:00 2001 From: Adam Plumer Date: Wed, 13 Mar 2019 22:35:36 -0500 Subject: [PATCH] feat: remove deprecated DOCUMENT token from platform-browser (#28117) PR Close #28117 --- .../platform-browser/src/dom/dom_tokens.ts | 22 ------------------- .../platform-browser/src/platform-browser.ts | 1 - .../platform-browser/platform-browser.d.ts | 3 --- 3 files changed, 26 deletions(-) delete mode 100644 packages/platform-browser/src/dom/dom_tokens.ts diff --git a/packages/platform-browser/src/dom/dom_tokens.ts b/packages/platform-browser/src/dom/dom_tokens.ts deleted file mode 100644 index 239805dc39..0000000000 --- a/packages/platform-browser/src/dom/dom_tokens.ts +++ /dev/null @@ -1,22 +0,0 @@ -/** - * @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 {DOCUMENT as commonDOCUMENT} from '@angular/common'; -import {InjectionToken} from '@angular/core'; - - -/** - * A DI Token representing the main rendering context. In a browser this is the DOM Document. - * - * Note: Document might not be available in the Application Context when Application and Rendering - * Contexts are not the same (e.g. when running the application into a Web Worker). - * - * @deprecated import from `@angular/common` instead. - * @publicApi - */ -export const DOCUMENT = commonDOCUMENT; diff --git a/packages/platform-browser/src/platform-browser.ts b/packages/platform-browser/src/platform-browser.ts index 28cee18de7..3ba7be0a36 100644 --- a/packages/platform-browser/src/platform-browser.ts +++ b/packages/platform-browser/src/platform-browser.ts @@ -12,7 +12,6 @@ export {Title} from './browser/title'; export {disableDebugTools, enableDebugTools} from './browser/tools/tools'; export {BrowserTransferStateModule, StateKey, TransferState, makeStateKey} from './browser/transfer_state'; export {By} from './dom/debug/by'; -export {DOCUMENT} from './dom/dom_tokens'; export {EVENT_MANAGER_PLUGINS, EventManager} from './dom/events/event_manager'; export {HAMMER_GESTURE_CONFIG, HAMMER_LOADER, HammerGestureConfig, HammerLoader} from './dom/events/hammer_gestures'; export {DomSanitizer, SafeHtml, SafeResourceUrl, SafeScript, SafeStyle, SafeUrl, SafeValue} from './security/dom_sanitization_service'; diff --git a/tools/public_api_guard/platform-browser/platform-browser.d.ts b/tools/public_api_guard/platform-browser/platform-browser.d.ts index 41edf392a5..e6a3d02824 100644 --- a/tools/public_api_guard/platform-browser/platform-browser.d.ts +++ b/tools/public_api_guard/platform-browser/platform-browser.d.ts @@ -16,9 +16,6 @@ export declare class By { export declare function disableDebugTools(): void; -/** @deprecated */ -export declare const DOCUMENT: InjectionToken; - export declare abstract class DomSanitizer implements Sanitizer { abstract bypassSecurityTrustHtml(value: string): SafeHtml; abstract bypassSecurityTrustResourceUrl(value: string): SafeResourceUrl;