MCPcopy Index your code
hub / github.com/ionic-team/ionic-framework / searchNavNode

Function searchNavNode

core/src/components/router/utils/dom.ts:217–226  ·  view source on GitHub ↗
(root: HTMLElement | undefined)

Source from the content-addressed store, hash-verified

215const OUTLET_SELECTOR = ':not([no-router]) ion-nav, :not([no-router]) ion-tabs, :not([no-router]) ion-router-outlet';
216
217const searchNavNode = (root: HTMLElement | undefined): NavOutletElement | undefined => {
218 if (!root) {
219 return undefined;
220 }
221 if (root.matches(OUTLET_SELECTOR)) {
222 return root as NavOutletElement;
223 }
224 const outlet = root.querySelector<NavOutletElement>(OUTLET_SELECTOR);
225 return outlet ?? undefined;
226};

Callers 3

writeNavStateFunction · 0.85
readNavStateFunction · 0.85
waitUntilNavNodeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected