Skip to content

feat: strict, quote-aware event argument parsing with literal support#7643

Open
AKnassa wants to merge 3 commits into
microsoft:mainfrom
AKnassa:feat/7567-strict-event-args
Open

feat: strict, quote-aware event argument parsing with literal support#7643
AKnassa wants to merge 3 commits into
microsoft:mainfrom
AKnassa:feat/7567-strict-event-args

Conversation

@AKnassa

@AKnassa AKnassa commented Jul 12, 2026

Copy link
Copy Markdown

What this does

Event handler arguments in declarative templates can now be real literal values — strings, numbers, true, false, null — and anything malformed is rejected loudly instead of being quietly misread.

Why

Previously every argument that was not $e or $c was assumed to be a binding path. So handler("hello, world") was silently mangled, and a typo produced confusing behaviour at runtime instead of a clear error at parse time.

What changed

  • String, number, boolean and null literals are parsed as literals
  • Commas and parentheses inside quoted strings are respected
  • String escape sequences (\n, \t, \\, \, and friends) are decoded; unknown ones throw
  • Malformed handler syntax now throws while the template is parsed
  • Docs updated

How to see it

Run the fast-element Playwright suite. 109 tests cover the parser.

Closes #7567

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
There may be pipelines that require an authorized user to comment /azp run to run.

@AKnassa AKnassa marked this pull request as ready for review July 13, 2026 04:06
@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
There may be pipelines that require an authorized user to comment /azp run to run.

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.

feat: add strict literal event arguments in fast declarative syntax

1 participant