[whatwg] Proposed updates for the command API's

On Tue, 12 Aug 2008, Dav Glass wrote:
> 
> > * ModifiedNodes - I think this would be better as a separate API, maybe 
> >    "queryCommandAffected()" or something, that returns the collection. 
> >    Also, maybe it should return a range rather than a collection. What is 
> >    the use case? (How and why would you actually use this?)
> 
> The use case is outlined here:
> http://blog.davglass.com/files/yui/html5/#examples

That's not a use case, it's an example of how it would work. By "use 
case", I mean, _why_ would you ever use this? What problem is it solving?


> The main issue with a range, is overlapping elements, that's why I would 
> opt for a collection :)

I don't understand, could you elaborate? Presumably which is more useful 
would depend primarily on the reason behind the feature, so maybe I need 
to have a clearer picture of the use case before I can really figure out 
whether a collection or a range is a better thing to return.


> > * SetClass makes sense, though the "State" depends on the class, which 
> >    the queryCommandState() and queryCommandValue() methods don't have 
> >    access to, so those wouldn't work quite as proposed.
> 
> Provided that we have valid Selector use, then this is not needed. We 
> can always test against a known class..

Good point.


> > * I'm not sure providing UI for SetStyle makes sense, but that might not 
> >    be a big deal.
> 
> I'm fine without the UI, most people will create their own UI for this anyway.

Agreed.

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

Received on Wednesday, 13 August 2008 02:45:06 UTC