Skip to content

fix: treat on as a normal attribute#165

Open
nanookclaw wants to merge 1 commit into
webtides:mainfrom
nanookclaw:fix/interpolated-on-attribute
Open

fix: treat on as a normal attribute#165
nanookclaw wants to merge 1 commit into
webtides:mainfrom
nanookclaw:fix/interpolated-on-attribute

Conversation

@nanookclaw
Copy link
Copy Markdown

Fixes #163.

What changed

A literal attribute named on is now treated as a normal string attribute instead of being routed through the old-school onevent handler path. The event-attribute check now requires at least one character after the on prefix, so onclick and @click still behave as event bindings while on="${value}" renders and updates as an attribute.

The same guard is applied in the SSR update path so client-side rendering and TemplateResult#toString() stay consistent.

Verification

  • npm test
  • npm run lint

Signed-off-by: Nanook Claw <nanook@agentmail.to>
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.

Bug: TypeError when setting on property as interpolated string

1 participant