W3C home > Mailing lists > Public > whatwg@whatwg.org > December 2004

[whatwg] Some questions to WF2

From: Ian Hickson <ian@hixie.ch>
Date: Sat, 11 Dec 2004 01:24:20 +0000 (UTC)
Message-ID: <Pine.LNX.4.61.0412110043580.4755@dhalsim.dreamhost.com>
On Fri, 10 Dec 2004, Maniac wrote:
> Olav Junker Kj?r wrote:
> 
> > Okay, but then the output element should also support the validation 
> > interface. I think it is confusing that elements which dont support 
> > validation exposes e.g. the setCustomValidity() method. I would prefer 
> > a flag isValidateable or something like that, which could be checked 
> > before accessing the validation interface.
> 
> May be then just specify new collection like 'form.validatedElements'? 
> It may be walked through without additional checking and allows not to 
> introduce confusing methods to other elements.

The problem is that then you can't just use the one array to cycle through 
the controls that won't be submitted, and if you do anything to the 
controls while looping through them to make them be submitted or not, the 
array will change length, which can lead to some strange bugs that are a 
pain to debug.

It just seems simpler all round to have the one array and a common 
interface.


> And for the DOM, I beleive, some pre-defined TreeWalker may do the 
> job...

Using the interfaces provided, it's certainly possible to create a tree 
walker which is pretty simple and does this. Without a common interface, 
though, you'd probably have to get a native implementation to do it 
sanely. I'd hate to see what it would look like written in JS! :-)

-- 
Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'
Received on Friday, 10 December 2004 17:24:20 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 16:58:38 UTC