Skip to content

Support :context directive everywhere. - #98

Merged
koculu merged 1 commit into
mainfrom
feature-context-directive-anywhere
Oct 12, 2026
Merged

koculu merged 1 commit into
mainfrom
feature-context-directive-anywhere

Conversation

@koculu

@koculu koculu commented Oct 12, 2026

Copy link
Copy Markdown
Member

Summary

Support :context directive everywhere.

Changes

:context="user" now makes user available as the context for an element and its children:

<div :context="user">
  <span>{{ name }}</span>
</div>

The context object is selected once when binding; its ref properties remain reactive. Component context input keeps its existing behavior.

  • Prepare app and component templates, including nested template.content, through the existing dynamic handler.
  • Respect configured directive names and existing :is/is attributes.
  • Use the full binding path for context scopes inside r-for.
  • Add coverage for preparation, aliases, reactivity, and scope isolation.
  • Update context documentation and package metadata for version 1.7.4.

@koculu
koculu merged commit a626d06 into main Oct 12, 2026
1 check passed
@koculu
koculu deleted the feature-context-directive-anywhere branch October 12, 2026 23:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant