Source

Element tracking Shadow DOM

sourceRoot determines where Tracker looks for source elements. Rendering location is a separate concern.

A detached <rxt-tracker> is configured from JavaScript before its first connection. Its source/query scope is the user-managed ShadowRoot, but its rail remains in the element's Light DOM. Tracker only queries the explicit sourceRoot; it does not magically pierce further Shadow DOM boundaries.

Compare with the Vanilla scenario, where the consumer independently places a renderHost inside the ShadowRoot.

Boundary model

User component                     Document Light DOM
└── open ShadowRoot ← sourceRoot   └── <rxt-tracker>
    └── tracked sources                └── .rxtt ← rail
Source/query context
open ShadowRoot
Renderer owner
<rxt-tracker> in document Light DOM
tracker.shadowRoot
null
Rail location
Light DOM child of <rxt-tracker>
Tracker stylesheet
document styling context

If <rxt-tracker> itself were placed inside a user-managed ShadowRoot, its package stylesheet would need to be available in that ShadowRoot's styling context.

Source/query context

Preparing the configured tracker.

Light DOM source

Light target 1

The same selector and rule are used regardless of which source/query context is active.

Light target 2

The same selector and rule are used regardless of which source/query context is active.