DOM Level 2 HTML obsolete? (Re: DOM Level 2 HTML: Note about onsubmit is misplaced in HTMLFormElement spec (in enctype attribute rather than in submit method))

On 2012-01-22 20:42, Ian Hickson wrote:
> On Sat, 21 Jan 2012, Filipus Klutiero wrote:
>> Dean Brettle wrote:
>>> In the spec for HTMLFormElement:
>>>
>>> http://www.w3.org/TR/DOM-Level-2-HTML/html.html#ID-40002357
>>>
>>> The following text should probably appear under the submit method
>>> instead of the enctype attribute:
>>>
>>> <quote>
>>> Note: The onsubmit even handler is not guaranteed to be triggered when
>>> invoking this method. The behavior is inconsistent for historical
>>> reasons and authors should not rely on a particular one.
>>> </quote>
>> I agree. I think fixing this would be quite important. The behavior of
>> .submit() is causing lots of confusion. See for example:
>> http://bugs.jquery.com/ticket/3115
>> http://bugs.jquery.com/ticket/4930
>> http://bugs.jquery.com/ticket/9704
>>
>> By the way, the description of the submit method reads:
>>> submit
>>>      Submits the form. It performs the same action as a submit button.
>> I don't think the last sentence is correct. Using a submit input will
>> trigger onsubmit. The submit method will not.
> That spec is obsolete now; for a contemporary and more thorough definition
> of the HTMLFormElement DOM API, please see the HTML standard:
>
>     http://whatwg.org/html#htmlformelement
>

Thank you Ian.

I must say it is far from obvious that DOM Level 2 HTML is obsolete. 
Even looking at http://www.w3.org/standards/techs/html#stds I get to 
http://www.w3.org/TR/1999/REC-html401-19991224/interact/forms.html which 
doesn't say anything about the DOM.

Received on Thursday, 2 February 2012 18:02:42 UTC