Source

Vanilla · same-origin document boundary

Iframe document context

A parent-owned Vanilla Tracker can operate entirely in a loaded same-origin iframe document. The JavaScript object and its event subscription stay in this parent page; every active DOM identity belongs consistently to the current child document realm.

Parent object, child runtime

Parent realm

Tracker instance #1

new Tracker(...)

tracker.on(...)

same-origin DOM access

Current child realm

Mounted runtime context

sourceRoot · scrollRoot · renderHost

Queries, geometry, observers, rendered DOM, scrolling, and Tracker CSS

A mounted runtime cannot mix DOM identities from different realms. Its sourceRoot, scrollRoot, and renderHost all belong to the currently loaded child document.

Current mount context

Role Current identity Responsibility
Tracker object Parent application · instance #1 Public API and event-subscription ownership
sourceRoot Waiting for child document Rule query and default mutation-observation scope
scrollRoot Waiting for child document Window geometry and built-in navigation
renderHost Waiting for child document Destination for Tracker-rendered DOM
Tracker stylesheet Waiting for child document Component styling inside the iframe boundary

Same-origin requirement: parent-side access to the child Document and Window requires a loaded same-origin iframe.

Parent CSS does not cross the iframe boundary. Because the rail is rendered into the child document, the public Tracker stylesheet is imported by the child bundle.

Document lifecycle

Navigation unmounts the reusable Tracker before replacing the child document, then mounts the same object after the new document loads.

Application lifecycle

These records describe application and iframe lifecycle actions, not Tracker runtime events.

    Actions

    Waiting for Child document #1 to load.

    Last child marker activation

    Activate a marker inside the child rail to inspect its parent-side reaction.

    Activated label
    None
    Owning selector
    None
    Child document generation
    None
    Payload element belongs to current child document
    Not checked

    Active child document

    Activating a lower marker changes the child Window scroll position while the parent page remains still. Adding a target mutates the same-origin child DOM and lets the child-owned observer synchronize its rail.