Options for scope.

Two knobs, both optional:

  • host, start a DOM walk from this element. Typical for components.
  • with, hand in fixed values for some slots. Typical for tests or headless code that has no DOM host.

They compose: pass both and with overrides whatever the DOM provides for the named slots. Pass neither and get returns undefined for everything.

Hierarchy

  • RuleScopeOptions

Properties

Properties

host?: HTMLElement

Element to start looking from when resolving slots that come from the DOM.

with?: Partial<SubjectRegistry>

Fixed values for specific slots. Wins over anything the DOM or a session-wide default would provide.