Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

@attributes to render an object of name => value to attributes #114

Closed
zachleat opened this issue Feb 22, 2023 · 1 comment
Closed

@attributes to render an object of name => value to attributes #114

zachleat opened this issue Feb 22, 2023 · 1 comment
Labels
enhancement New feature or request
Milestone

Comments

@zachleat
Copy link
Member

<img @attributes>

<!-- same as: -->
<img @attributes="webc.attributes">

to render all public attributes inherited as webc.attributes via #104.

You can also render an object (note the parenthesis there to avoid parsing as a JS block + label.

<img @attributes="({ myKey: 1 })">

to render <img myKey="1">

@zachleat zachleat added the enhancement New feature or request label Feb 22, 2023
@zachleat zachleat added this to the WebC v0.9.0 milestone Feb 22, 2023
@zachleat
Copy link
Member Author

Shipping with WebC v0.9.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant