diff --git a/aio/scripts/_payload-limits.json b/aio/scripts/_payload-limits.json index e616877f8d..6639da1ce5 100755 --- a/aio/scripts/_payload-limits.json +++ b/aio/scripts/_payload-limits.json @@ -12,7 +12,7 @@ "master": { "uncompressed": { "runtime-es2015": 2987, - "main-es2015": 456604, + "main-es2015": 448956, "polyfills-es2015": 52487 } } @@ -21,7 +21,7 @@ "master": { "uncompressed": { "runtime-es2015": 3097, - "main-es2015": 426978, + "main-es2015": 427017, "polyfills-es2015": 52487 } } diff --git a/integration/_payload-limits.json b/integration/_payload-limits.json index 4ff1e37a2e..a87a8b5a7f 100644 --- a/integration/_payload-limits.json +++ b/integration/_payload-limits.json @@ -39,7 +39,7 @@ "master": { "uncompressed": { "runtime-es2015": 2289, - "main-es2015": 254657, + "main-es2015": 247225, "polyfills-es2015": 36808, "5-es2015": 751 } diff --git a/packages/core/src/core_private_export.ts b/packages/core/src/core_private_export.ts index 0fbe3c5f09..640d7369fb 100644 --- a/packages/core/src/core_private_export.ts +++ b/packages/core/src/core_private_export.ts @@ -12,6 +12,7 @@ export {defaultIterableDiffers as ɵdefaultIterableDiffers, defaultKeyValueDiffe export {devModeEqual as ɵdevModeEqual, isListLikeIterable as ɵisListLikeIterable} from './change_detection/change_detection_util'; export {ChangeDetectorStatus as ɵChangeDetectorStatus, isDefaultChangeDetectionStrategy as ɵisDefaultChangeDetectionStrategy} from './change_detection/constants'; export {Console as ɵConsole} from './console'; +export {getDebugNodeR2 as ɵgetDebugNodeR2} from './debug/debug_node'; export {inject, setCurrentInjector as ɵsetCurrentInjector, ɵɵinject} from './di/injector_compatibility'; export {getInjectableDef as ɵgetInjectableDef, ɵɵInjectableDef, ɵɵInjectorDef} from './di/interface/defs'; export {INJECTOR_SCOPE as ɵINJECTOR_SCOPE} from './di/scope'; diff --git a/packages/core/src/debug/debug_node.ts b/packages/core/src/debug/debug_node.ts index 80441cb5b7..26f8042cbf 100644 --- a/packages/core/src/debug/debug_node.ts +++ b/packages/core/src/debug/debug_node.ts @@ -727,6 +727,18 @@ export function getDebugNode__POST_R3__(nativeNode: any): DebugNode|null { */ export const getDebugNode: (nativeNode: any) => DebugNode | null = getDebugNode__PRE_R3__; + +export function getDebugNodeR2__PRE_R3__(nativeNode: any): DebugNode|null { + return getDebugNode__PRE_R3__(nativeNode); +} + +export function getDebugNodeR2__POST_R3__(_nativeNode: any): DebugNode|null { + return null; +} + +export const getDebugNodeR2: (nativeNode: any) => DebugNode | null = getDebugNodeR2__PRE_R3__; + + export function getAllDebugNodes(): DebugNode[] { return Array.from(_nativeNodeToDebugNode.values()); } diff --git a/packages/platform-browser/src/dom/debug/ng_probe.ts b/packages/platform-browser/src/dom/debug/ng_probe.ts index 2ed9656c3b..e6d4942d0a 100644 --- a/packages/platform-browser/src/dom/debug/ng_probe.ts +++ b/packages/platform-browser/src/dom/debug/ng_probe.ts @@ -6,7 +6,7 @@ * found in the LICENSE file at https://angular.io/license */ -import {APP_INITIALIZER, ApplicationRef, DebugNode, NgProbeToken, NgZone, Optional, Provider, getDebugNode} from '@angular/core'; +import {APP_INITIALIZER, ApplicationRef, DebugNode, NgProbeToken, NgZone, Optional, Provider, ɵgetDebugNodeR2} from '@angular/core'; import {exportNgVar} from '../util'; @@ -23,14 +23,14 @@ const CORE_TOKENS_GLOBAL_NAME = 'coreTokens'; * null if the given native element does not have an Angular view associated * with it. */ -export function inspectNativeElement(element: any): DebugNode|null { - return getDebugNode(element); +export function inspectNativeElementR2(element: any): DebugNode|null { + return ɵgetDebugNodeR2(element); } -export function _createNgProbe(coreTokens: NgProbeToken[]): any { - exportNgVar(INSPECT_GLOBAL_NAME, inspectNativeElement); +export function _createNgProbeR2(coreTokens: NgProbeToken[]): any { + exportNgVar(INSPECT_GLOBAL_NAME, inspectNativeElementR2); exportNgVar(CORE_TOKENS_GLOBAL_NAME, {...CORE_TOKENS, ..._ngProbeTokensToMap(coreTokens || [])}); - return () => inspectNativeElement; + return () => inspectNativeElementR2; } function _ngProbeTokensToMap(tokens: NgProbeToken[]): {[name: string]: any} { @@ -52,7 +52,7 @@ export const ELEMENT_PROBE_PROVIDERS__POST_R3__ = []; export const ELEMENT_PROBE_PROVIDERS__PRE_R3__: Provider[] = [ { provide: APP_INITIALIZER, - useFactory: _createNgProbe, + useFactory: _createNgProbeR2, deps: [ [NgProbeToken, new Optional()], ],