From ea67a1d436d58af10a8158c8d768b5986687d461 Mon Sep 17 00:00:00 2001 From: Brian Holt Date: Mon, 2 Feb 2015 17:16:33 -0800 Subject: [PATCH 1/2] Added itemRef and itemId for complete microdata support. --- docs/docs/ref-04-tags-and-attributes.md | 2 +- src/browser/ui/dom/HTMLDOMPropertyConfig.js | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/docs/docs/ref-04-tags-and-attributes.md b/docs/docs/ref-04-tags-and-attributes.md index 5d629efd7a..2d5dbb78c5 100644 --- a/docs/docs/ref-04-tags-and-attributes.md +++ b/docs/docs/ref-04-tags-and-attributes.md @@ -69,7 +69,7 @@ In addition, the following non-standard attributes are supported: - `autoCapitalize autoCorrect` for Mobile Safari. - `property` for [Open Graph](http://ogp.me/) meta tags. -- `itemProp itemScope itemType` for [HTML5 microdata](http://schema.org/docs/gs.html). +- `itemProp itemScope itemType itemRef itemId` for [HTML5 microdata](http://schema.org/docs/gs.html). 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. diff --git a/src/browser/ui/dom/HTMLDOMPropertyConfig.js b/src/browser/ui/dom/HTMLDOMPropertyConfig.js index 1aa5e11857..ba48c59b18 100644 --- a/src/browser/ui/dom/HTMLDOMPropertyConfig.js +++ b/src/browser/ui/dom/HTMLDOMPropertyConfig.js @@ -164,11 +164,13 @@ var HTMLDOMPropertyConfig = { // keyboard hints. autoCapitalize: null, autoCorrect: null, - // itemProp, itemScope, itemType are for Microdata support. See - // http://schema.org/docs/gs.html + // itemProp, itemScope, itemType, itemType, itemId are for + // Microdata support. See http://schema.org/docs/gs.html itemProp: MUST_USE_ATTRIBUTE, itemScope: MUST_USE_ATTRIBUTE | HAS_BOOLEAN_VALUE, itemType: MUST_USE_ATTRIBUTE, + itemId: MUST_USE_ATTRIBUTE, + itemRef: MUST_USE_ATTRIBUTE, // property is supported for OpenGraph in meta tags. property: null }, From 7b92d717441b1dac39159e446345df32e487cde9 Mon Sep 17 00:00:00 2001 From: Brian Holt Date: Mon, 2 Feb 2015 21:58:00 -0800 Subject: [PATCH 2/2] Changed itemId to itemID and added clarity to the comments of where it is specified. --- src/browser/ui/dom/HTMLDOMPropertyConfig.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/browser/ui/dom/HTMLDOMPropertyConfig.js b/src/browser/ui/dom/HTMLDOMPropertyConfig.js index ba48c59b18..bab2a295da 100644 --- a/src/browser/ui/dom/HTMLDOMPropertyConfig.js +++ b/src/browser/ui/dom/HTMLDOMPropertyConfig.js @@ -169,7 +169,10 @@ var HTMLDOMPropertyConfig = { itemProp: MUST_USE_ATTRIBUTE, itemScope: MUST_USE_ATTRIBUTE | HAS_BOOLEAN_VALUE, itemType: MUST_USE_ATTRIBUTE, - itemId: MUST_USE_ATTRIBUTE, + // itemID and itemRef are for Microdata support as well but + // only specified in the the WHATWG spec document. See + // https://html.spec.whatwg.org/multipage/microdata.html#microdata-dom-api + itemID: MUST_USE_ATTRIBUTE, itemRef: MUST_USE_ATTRIBUTE, // property is supported for OpenGraph in meta tags. property: null