[whatwg] Microdata feedback

Ian Hickson ian at hixie.ch
Fri Jul 8 16:19:02 PDT 2011


On Sat, 9 Jul 2011, Philip Jägenstedt wrote:
> 
> Step 11 is "If current has an itemprop attribute specified, add it to 
> results." but should be "If current has one or more property names, add 
> it to results." Property names are defined in 
> http://www.whatwg.org/specs/web-apps/current-work/multipage/microdata.html#property-names
> 
> Why? If you start with <div itemprop="foo">, then 
> div.itemProp.remove("foo") would give you <div itemprop="">. It'd be 
> weird if the element still showed up in the properties collection after 
> removing the only property name.

The .properties attribute "must return an HTMLPropertiesCollection rooted 
at the Document node, whose filter matches only elements that have 
property names", which further filters the results of the algorithm. 
Similarly, everything that uses the algorithm here does things "for each 
property name", so if itemprop="" doesn't have any tokens, nothing happens 
and it doesn't matter that the algorithm returns it.

-- 
Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'


More information about the whatwg mailing list