Updating "JSX Gotchas" docs for Custom Attributes

Adds note that custom attributes are supported on custom elements.
This commit is contained in:
David Khourshid
2015-10-21 08:18:48 -04:00
parent dc1ba6f473
commit c840214aeb

View File

@@ -61,6 +61,12 @@ If you pass properties to native HTML elements that do not exist in the HTML spe
<div data-custom-attribute="foo" />
```
However, arbitrary attributes are supported on custom elements (those with a hyphen in the tag name or an `is="..."` attribute).
```javascript
<x-my-component custom-attribute="foo" />
```
[Web Accessibility](http://www.w3.org/WAI/intro/aria) attributes starting with `aria-` will be rendered properly.
```javascript