Re: [whatwg] Proposal to extend Microdata API specification

On Fri, 16 Mar 2012, ~Uго~@ ~]иколаев wrote:
> 
> 1. itemValue for <form> elements (INPUT, TEXTAREA, PROGRESS, METER, SELECT,
> OUTPUT):
> It's difficult to control form's element with Microdata API. Setting
> itemValue for these elements set their "textContent" value, what is a bit
> messy.
> My proposal is setting "value" property instead of "textContent" for them.

What's the use case for having form controls expose microdata?


> 2. "scopedItem" for properties.
> It's difficult to take the parent `Microdata item` out of
> current `Microdata item` in event listener, for example.
> My proposal is to add property with the name something like "scopedItem"
> that will return the parent of current `Microdata item`. For "root"
> Microdata item it can return null.

Unfortunately an item can have multiple parents:

   <div itemscope itemref="a"></div>
   <div itemscope itemref="a"></div>
   <div id=a itemprop=a itemscope></div> <!-- two parents! -->

...so it's not obvious how to make this work.

Can you elaborate on the use case? (You gave some sample markup but I 
couldn't work out what it was trying to do and why microdata would be the 
way to do it.)

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

Received on Friday, 8 June 2012 22:55:22 UTC