Document jqhtml attribute restrictions in CLAUDE.dist.md
🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -650,6 +650,12 @@ async on_load() {
|
||||
- **`$quoted="string"`** → String literal
|
||||
- **`$unquoted=expression`** → JavaScript expression
|
||||
- **`$sid="name"`** → Scoped element ID
|
||||
- **`attr="<%= expr %>"`** → HTML attribute with interpolation
|
||||
|
||||
**Key restrictions:**
|
||||
- **`<Define>` attributes are static** - No `<%= %>` on the `<Define>` tag. For dynamic attributes on the root element, use inline JS: `<% this.$.attr('data-id', this.args.id); %>`
|
||||
- **`$prefix` = component args, NOT HTML attributes** - `<My_Component $data-id=123 />` creates `this.args['data-id']`, not a `data-id` DOM attribute
|
||||
- **Conditional attributes use if-statements** - `<% if (cond) { %>checked<% } %>` not ternaries
|
||||
|
||||
### Component Access
|
||||
|
||||
|
||||
Reference in New Issue
Block a user