44
55import '../../../../ui/components/icon_button/icon_button.js' ;
66import './Table.js' ;
7+ import './NodeLink.js' ;
78
89import * as i18n from '../../../../core/i18n/i18n.js' ;
910import type { DOMSizeInsightModel } from '../../../../models/trace/insights/DOMSize.js' ;
@@ -12,6 +13,7 @@ import * as Lit from '../../../../ui/lit/lit.js';
1213import type * as Overlays from '../../overlays/overlays.js' ;
1314
1415import { BaseInsightComponent } from './BaseInsightComponent.js' ;
16+ import type * as NodeLink from './NodeLink.js' ;
1517import type { TableData } from './Table.js' ;
1618
1719const UIStrings = {
@@ -68,12 +70,34 @@ export class DOMSize extends BaseInsightComponent<DOMSizeInsightModel> {
6870
6971 if ( domStatsData . maxDepth ) {
7072 const { nodeId, nodeName} = domStatsData . maxDepth ;
71- rows . push ( { values : [ i18nString ( UIStrings . maxDOMDepth ) , this . renderNode ( nodeId , nodeName ) ] } ) ;
73+ // clang-format off
74+ const template = html `
75+ < devtools-performance-node-link
76+ .data =${ {
77+ backendNodeId : nodeId ,
78+ frame : domStatsData . frame ,
79+ fallbackText : nodeName ,
80+ } as NodeLink . NodeLinkData } >
81+ </ devtools-performance-node-link >
82+ ` ;
83+ // clang-format on
84+ rows . push ( { values : [ i18nString ( UIStrings . maxDOMDepth ) , template ] } ) ;
7285 }
7386
7487 if ( domStatsData . maxChildren ) {
7588 const { nodeId, nodeName} = domStatsData . maxChildren ;
76- rows . push ( { values : [ i18nString ( UIStrings . maxChildren ) , this . renderNode ( nodeId , nodeName ) ] } ) ;
89+ // clang-format off
90+ const template = html `
91+ < devtools-performance-node-link
92+ .data =${ {
93+ backendNodeId : nodeId ,
94+ frame : domStatsData . frame ,
95+ fallbackText : nodeName ,
96+ } as NodeLink . NodeLinkData } >
97+ </ devtools-performance-node-link >
98+ ` ;
99+ // clang-format on
100+ rows . push ( { values : [ i18nString ( UIStrings . maxChildren ) , template ] } ) ;
77101 }
78102
79103 if ( ! rows . length ) {
0 commit comments