| OLD | NEW |
| (Empty) |
| 1 // Up-to-date as of 2013-04-19. | |
| 2 // Things defined in the W3C's microdata draft, not the main HTML5 draft. | |
| 3 // Note: must be included last so that it hits all elements. | |
| 4 | |
| 5 for (var element in elements) { | |
| 6 elements[element].itemScope = "boolean"; | |
| 7 elements[element].itemType = "settable tokenlist"; | |
| 8 elements[element].itemId = "url"; | |
| 9 elements[element].itemRef = "settable tokenlist"; | |
| 10 elements[element].itemProp = "settable tokenlist"; | |
| 11 } | |
| 12 extraTests.push(function() { | |
| 13 // itemValue only reflects in certain circumstances. The syntax for our big | |
| 14 // array thing above doesn't currently support one IDL attribute that reflects | |
| 15 // different content attributes, so just do this explicitly until that's fixed
. | |
| 16 var reflectItemValue = function(data, localName, attribute) { | |
| 17 var element = document.createElement(localName); | |
| 18 element.setAttribute("itemprop", ""); | |
| 19 ReflectionTests.reflects(data, "itemValue", element, attribute); | |
| 20 } | |
| 21 reflectItemValue("string", "meta", "content"); | |
| 22 reflectItemValue("url", "audio", "src"); | |
| 23 reflectItemValue("url", "embed", "src"); | |
| 24 reflectItemValue("url", "iframe", "src"); | |
| 25 reflectItemValue("url", "img", "src"); | |
| 26 reflectItemValue("url", "source", "src"); | |
| 27 reflectItemValue("url", "track", "src"); | |
| 28 reflectItemValue("url", "video", "src"); | |
| 29 reflectItemValue("url", "a", "href"); | |
| 30 reflectItemValue("url", "area", "href"); | |
| 31 reflectItemValue("url", "link", "href"); | |
| 32 reflectItemValue("url", "object", "data"); | |
| 33 reflectItemValue("string", "data", "value"); | |
| 34 //TODO: time is more complex | |
| 35 }); | |
| OLD | NEW |