Skip to content

Function: pageTabRecord()

pageTabRecord(): TabRecord | undefined

Defined in: aiui-intent-runtime/src/instrumentation.ts:53

The canonical tab record for the CURRENT page — the ONE builder both intent hosts use to describe a tab on selection/navigation events (the lowering pipeline renders it as the <tab …/> element).

SELF-CONTAINED BY CONTRACT: the CDP host injects this function into driven pages by STRINGIFYING it (see the intent client's buildPageScript), so its body must reference nothing outside itself — no imports, no module consts, no other functions. The extension's content script imports and calls it directly; there it runs in the ISOLATED world, where the page-realm window.__AIUI__ is invisible but the DOM footprint (stamped data-source-loc / data-cell attributes) still marks an aiui app — sourceRoot is page-realm-only and simply stays absent.

Detection READS the global, never creates it — getInstrumentation would mint __AIUI__ on a page that has no aiui at all.

Returns

TabRecord | undefined