[whatwg] Microdata feedback
Philip Jägenstedt
philipj at opera.com
Fri Jul 8 23:41:39 PDT 2011
On Sat, 09 Jul 2011 01:19:02 +0200, Ian Hickson <ian at hixie.ch> wrote:
> 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.
Ah, I see my misunderstanding.
Purely editorial: It would, IMO, be more clear if that check were in the
algorithm itself. That's the way it's going to be (has been) implemented
since there's no reason to do the filtering as a separate step. Do as you
wish.
--
Philip Jägenstedt
Core Developer
Opera Software
More information about the whatwg
mailing list