Expand description
Host-neutral low-level introspection read surface (phase 5): post-layout geometry, full computed style + provenance, typed component reads, tree serialization, and global runtime state. Low-level introspection read surface (design 4.7): post-layout geometry, full computed style + cascade provenance, typed component reads, tree serialization, and global runtime state.
Like the rest of the DOM read side, every getter reads a process-global
snapshot the runtime publishes each tick, so a Send + Sync script host
with no &World at call time can inspect the live app. Geometry,
component maps, frame state, and the signal set are published by the
runtime’s introspection system, and the pointer state by
[publish_pointer_state], which every platform installs; computed_style() and
matched_rules() re-run the cascade host-side over the same
stylesheet + tree the phase-2 detail snapshot already carries.
computed_style(), matched_rules(), dump_tree(), and
signals_all() walk the whole tree or re-run the cascade; they are
inspection calls, not a per-frame hot path.
Structs§
- Frame
Info - Per-frame counters for perf-aware scripts.
- Introspect
Snapshot - Geometry + component maps published each tick, keyed by packed handle.
- Matched
Rule View - One matched stylesheet rule with cascade provenance, for
matched_rules(). - Node
Geometry - Per-node geometry published into the snapshot each tick.
- Node
Rect - Post-layout box,
getBoundingClientRect-class.x/yare local to the parent;client_x/client_yare window coordinates. - Node
Scroll - Scroll offsets and their travel limits for a scroll container.
- Pointer
Snapshot - Pointer state: window position, pressed buttons, live modifiers.
Functions§
- dump_
tree dump_tree(): a whole-tree structural dump (id / tag / classes / rect) for debugging. An inspection call.- frame_
info frame_info():{frame, dt_ms, dirty_count}.- inner_
markup n.inner_markup(): serialize this node’s children (not the node itself) to.lmn-ish text. The read half ofset_inner_markup; reuses the same serializer over the child range.- node_
attrs n.attrs(): the full attribute map,id/class(from the index),text, then every generic attribute.- node_
classes n.classes(): the full class list.- node_
component n.component(name): that component’s public fields as a value map.Errnames an unknown / non-whitelisted component;Ok(None)means the component is whitelisted but absent from this node.- node_
components n.components(): the names of the whitelisted Lumen components present on this node.- node_
computed_ style_ map n.computed_style(): every modeled CSS property the cascade resolved, as(name, value)pairs. Re-runs the cascade host-side; an inspection call.- node_
content_ rect n.content_rect(): inner box minus padding + border.- node_
entity_ id n.entity_id(): the raw(index, generation)for debugging / handle round-trip.Nonefor a null / reserved-token / invalid handle.- node_
inline_ style n.inline_style(): theelement.styleoverride map.- node_
is_ visible n.is_visible(): effective visibility. A handle absent from the snapshot (despawned) readsfalse.- node_
matched_ rules n.matched_rules(): the stylesheet rules that matched this node with their cascade provenance, ascending in cascade order (last wins).- node_
rect n.rect(): post-layout border-box, local + client.- node_
scroll n.scroll(): scroll offsets and their limits.- node_
z_ index n.z_index(): resolved stacking order (0when unset / unknown).- outer_
markup n.outer_markup(): serialize this subtree to.lmn-ish text.- pointer_
state pointer_state(): window position, buttons, modifiers.- publish_
introspection - Publish a freshly-built introspection snapshot for cross-thread readers.
- publish_
pointer - Publish the pointer state
pointer_state()reads. - publish_
pointer_ state - Publish what the input layer knows about the pointer each tick, so a read from a handler sees this tick’s position.
- signals_
all signals_all(): the whole PropertyStore signal set as(name, value)pairs. An inspection call.
Type Aliases§
- Component
Fields - A component’s field map:
(field, value)pairs. - Component
Maps - Per-node component field maps:
(component_name, fields)in registry order, keyed by packed handle.