W3C home > Mailing lists > Public > whatwg@whatwg.org > January 2006

[whatwg] Allow <form> as a child of <tbody>

From: Simon Pieters <zcorpan@hotmail.com>
Date: Thu, 19 Jan 2006 00:12:48 +0000
Message-ID: <BAY109-F22A3890E03F837BE4C3574B41C0@phx.gbl>
Hi,

From: Ian Hickson <ian@hixie.ch>
>Check the DOM for that markup. "Backwards compatible" is not the words I
>would use...

I did some more testing[1] on this. It seems that in Mozilla and Opera, the 
DOM tree for...

   <table><tbody><form><tr><td><input></td></tr></form></tbody></table>

...looks like this:

TABLE
- TBODY
- - FORM
- - TR
- - - TD
- - - - INPUT

In IE6 the DOM tree looks like this:

TABLE
- TBODY
- - FORM
- - - TR
- - - - TD
- - - - - INPUT

Even though the FORM is not an ancestor to the INPUT in the DOM tree in 
Mozilla or Opera, the DOM2 HTML attributes .form and .elements work as if it 
was. The same holds true when <form> is placed as a child of TABLE, TBODY 
(presumably also THEAD and TFOOT), and TR.

(Given that this works in Mozilla and Opera even though the FORM is not an 
ancestor of the INPUT, gives me a feeling that it wouldn't be impossible to 
implement form="". Indeed, form="" is already implemented in Opera 9 build 
8031, if I'm not mistaken.)

[1] http://zcorpan.1go.dk/test/html/table-form/

Regards,
Simon Pieters
Received on Wednesday, 18 January 2006 16:12:48 UTC

This archive was generated by hypermail 2.3.1 : Monday, 13 April 2015 23:08:25 UTC