*dominate
*dominate marks a <serc-rod> host as the authority for its own redraw timing. This is the preferred spelling. The older *dominant / n-dominant spelling remains available as a compatibility alias.
Sercrod hosts are intentionally world-like units: each host owns its data scope, scheduler, template, and lifecycle. *dominate makes that boundary explicit for rendering. The host does not follow ordinary automatic redraw flow just because data changed nearby or an automatic update path ran.
In short, *dominate moves render authority from automatic data-change flow to explicit host commands.
The host still renders normally on initial connection, and it still accepts explicit redraw commands such as *update, *apply, *restore, or direct el.update() calls.
*dominate does not block placement authority owned by *iterate="place".
Behavior
- Initial render is allowed.
- Automatic redraws from data setter updates are suppressed.
- Automatic redraws after ordinary events are suppressed.
*iterate="place"placement sync is still allowed during those suppressed automatic redraws.- Registered iterate regions are synchronized without clearing the parent template.
- Explicit redraws are allowed.
*updateandn-updateare treated as explicit redraw commands.*applyand*restorestill redraw the staged host after committing or restoring.- Child hosts remain independent worlds with their own data, scheduler, and update flow.
*dominate="false" disables the behavior while leaving the attribute in place.
Recommended shape
Use *dominate on a large outer host when that host should keep redraw authority, then place independently updating child hosts inside it.
<serc-rod data='{ "items": [] }' *dominate>
<serc-rod data='{ "selected": null, "count": 0 }'>
<button @click="count = count + 1">Count</button>
<span *print="count"></span>
</serc-rod>
</serc-rod>
Prefer explicit data on child hosts when they own interactive state. That keeps redraw ownership clear: the dominate parent is the stable world, and the child host is the live update unit.
When a child host is produced by *iterate="place", data="item" is evaluated by the parent placement scope before the child starts. The child receives that item as its data root, so expressions inside it can use %title% instead of %item.title%.
Notes
*dominateis not a virtual DOM, cache, or DOM preservation layer.- It is not a general diff engine; it separates parent render authority from child placement authority.
- It does not remove DOM nodes.
- It does not prevent explicit redraws.
- It does not prevent
*iterate="place"from synchronizing its own managed region. - Avoid putting
*dominateon many small hosts unless each of them should opt out of automatic host redraws.