Skip to content

Commit

Permalink
Docs for 11ty/webc#71
Browse files Browse the repository at this point in the history
  • Loading branch information
zachleat committed Dec 2, 2022
1 parent 930f0df commit d4994e8
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/docs/languages/webc.md
Original file line number Diff line number Diff line change
Expand Up @@ -472,7 +472,8 @@ Make any attribute into a prop by prefixing it with `@`. Props are “private”
<!-- outputs <p>Hello</p> -->
```

* In the HTML specification, attribute names are lower-case. When referencing these inside of a dynamic attribute, use the lower-case name (e.g. `<my-component @propName="test">` would be `@text="propname"`). See [issue #71 for more discussion](https://github.com/11ty/webc/issues/71).
* In the HTML specification, attribute names are lower-case. When referencing these inside of a dynamic attribute, use the lower-case name (e.g. `<my-component @propName="test">` would be `@text="propname"`). More at [issue #71](https://github.com/11ty/webc/issues/71).
* {% addedin "WebC v0.8.0" %}Attribute or property names with dashes are converted to camelcase for JS (e.g. `<my-component @prop-name="test">` can be used like `@text="propName"`). More at [issue #71](https://github.com/11ty/webc/issues/71).

### Dynamic attributes

Expand All @@ -491,6 +492,7 @@ Make any attribute into a dynamic attribute by prefixing it with `:`. You have a
```

* In the HTML specification, attribute names are lower-case. When referencing these inside of a dynamic attribute, use the lower-case name (e.g. `<avatar-image mySrc="test">` would be `:src="mysrc"`). See [issue #71 for more discussion](https://github.com/11ty/webc/issues/71).
* {% addedin "WebC v0.8.0" %}Attribute or property names with dashes are converted to camelcase for JS (e.g. `<my-component @prop-name="test">` can be used like `@text="propName"`). More at [issue #71](https://github.com/11ty/webc/issues/71).
* WebC versions prior to `0.5.0` required `this.` (e.g. `this.src`/`this.alt`) when referencing data/attributes/property values. This is no longer required in dynamic attributes.


Expand Down

0 comments on commit d4994e8

Please sign in to comment.