feat(core): add host node to DeferBlockData (#66546) · angular/angular@92d2498

@@ -27,7 +27,7 @@ import {assertLView} from '../assert';

2727

import {collectNativeNodes} from '../collect_native_nodes';

2828

import {getLContext} from '../context_discovery';

2929

import {CONTAINER_HEADER_OFFSET, NATIVE} from '../interfaces/container';

30-

import {INJECTOR, LView, TVIEW} from '../interfaces/view';

30+

import {HOST, INJECTOR, LView, TVIEW} from '../interfaces/view';

3131

import {getNativeByTNode} from './view_utils';

32323333

/** Retrieved information about a `@defer` block. */

@@ -65,6 +65,9 @@ export interface DeferBlockData {

6565

/** Stringified version of the block's triggers. */

6666

triggers: string[];

676768+

/** The comment host/container node next to which all of the root nodes are rendered. */

69+

hostNode: Node;

70+6871

/** Element root nodes that are currently being shown in the block. */

6972

rootNodes: Node[];

7073

}

@@ -156,6 +159,7 @@ function findDeferBlocks(node: Node, lView: LView, results: DeferBlockData[]) {

156159

minimumTime: tDetails.placeholderBlockConfig?.[MINIMUM_SLOT] ?? null,

157160

},

158161

triggers: tDetails.debug?.triggers ? Array.from(tDetails.debug.triggers).sort() : [],

162+

hostNode: details.lContainer[HOST] as Node,

159163

rootNodes,

160164

};

161165