Skip to content

Commit 4558e2c

Browse files
committed
Merge pull request react#1491 from naturalatlas/itemscope
Added support for itemscope, itemtype, itemprop attributes.
2 parents 46de927 + f399b68 commit 4558e2c

2 files changed

Lines changed: 8 additions & 1 deletion

File tree

docs/docs/ref-04-tags-and-attributes.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,11 @@ scrollLeft scrollTop seamless selected size span spellCheck src srcDoc step
6464
style tabIndex target title type value width wmode
6565
```
6666

67-
In addition, the non-standard `autoCapitalize` and `autoCorrect` attributes are supported for Mobile Safari, and the `property` attribute is supported for Open Graph `<meta>` tags.
67+
In addition, the following non-standard attributes are supported:
68+
69+
- `autoCapitalize autoCorrect` for Mobile Safari.
70+
- `property` for [Open Graph](http://ogp.me/) meta tags.
71+
- `itemProp itemScope itemType` for [HTML5 microdata](http://schema.org/docs/gs.html).
6872

6973
There is also the React-specific attribute `dangerouslySetInnerHTML` ([more here](/react/docs/special-non-dom-attributes.html)), used for directly inserting HTML strings into a component.
7074

src/browser/ui/dom/HTMLDOMPropertyConfig.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,9 @@ var HTMLDOMPropertyConfig = {
135135
*/
136136
autoCapitalize: null, // Supported in Mobile Safari for keyboard hints
137137
autoCorrect: null, // Supported in Mobile Safari for keyboard hints
138+
itemProp: MUST_USE_ATTRIBUTE, // Microdata: http://schema.org/docs/gs.html
139+
itemScope: MUST_USE_ATTRIBUTE | HAS_BOOLEAN_VALUE, // Microdata: http://schema.org/docs/gs.html
140+
itemType: MUST_USE_ATTRIBUTE, // Microdata: http://schema.org/docs/gs.html
138141
property: null // Supports OG in meta tags
139142
},
140143
DOMAttributeNames: {

0 commit comments

Comments
 (0)