You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
chore: remove deprecated declarative event e support (#7486)
# Pull Request
## 📖 Description
Remove deprecated support for bare `e` in FAST declarative event handler arguments.
This makes `$e` and `$c` the only special event-binding arguments, removes the deprecated warning/runtime compatibility path, deletes the deprecated warning fixture, and updates the migration and declarative docs for the breaking change.
### 🎫 Issues
- Closes#7371
## 👩💻 Reviewer Notes
The main changes are in `packages/fast-element/src/declarative/`:
- bare `e` is no longer treated as a special event argument
- `TemplateParser.hasDeprecatedEventSyntax` and the related warning path were removed
- declarative fixtures and docs now use `$e`
I also excluded declarative fixture `templates.html`/generated `index.html` files from the repo's Biome changed-file checks because those artifacts are whitespace-sensitive and Biome's explicit file-path mode was flagging generated fixture HTML that is intentionally not formatter-safe.
## 📑 Test Plan
- `npm run build`
- `npm run test`
- `npm run biome:check`
- `npm run checkchange`
## ✅ Checklist
### General
- [x] I have included a change request file using `$ npm run change`
- [x] I have added tests for my changes.
- [x] I have tested my changes.
- [x] I have updated the project documentation to reflect my changes.
- [x] I have read the [CONTRIBUTING](https://github.com/microsoft/fast/blob/main/CONTRIBUTING.md) documentation and followed the [standards](https://github.com/microsoft/fast/blob/main/CODE_OF_CONDUCT.md#our-standards) for this project.
## ⏭ Next Steps
- None.
|`parse()`| public | Entry point: parses declarative HTML into `{ strings, values }`. |
353
352
|`createTemplate()`| public | Creates a `ViewTemplate` from resolved strings and values. |
354
-
|`hasDeprecatedEventSyntax`| public | Getter indicating whether the last parse encountered deprecated `e` event syntax. |
355
353
|`resolveStringsAndValues()`| private | Creates `strings`/`values` arrays and delegates to `resolveInnerHTML()`. |
356
354
|`resolveInnerHTML()`| private | Recursive HTML parser that dispatches to data binding or template directive handlers. |
357
355
|`resolveDataBinding()`| private | Thin dispatcher that routes to `resolveContentBinding()`, `resolveAttributeBinding()`, or `resolveAttributeDirectiveBinding()`. |
Copy file name to clipboardExpand all lines: packages/fast-element/DECLARATIVE_HTML.md
+2-5Lines changed: 2 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -358,15 +358,12 @@ You can pass the DOM event object, the execution context, or both as arguments.
358
358
<button@click="{handleClick($e, $c)}"></button>
359
359
```
360
360
361
-
**Arbitrary binding expressions** — any token that is not `$e`, `$c`, or `e` is resolved as a binding path on the data source:
361
+
**Arbitrary binding expressions** — any token that is not `$e`or `$c` is resolved as a binding path on the data source:
362
362
```html
363
363
<button@click="{handleClick(user.id)}"></button>
364
364
```
365
365
366
-
> **Deprecated:** The bare `e` token still works but will emit a console warning once per component. The warning includes the component name to help locate usage. Migrate to `$e`.
0 commit comments