Re: [DOM-Events] General thoughts on DOM-Events (Editor's Draft 20 July 2009)

On Wed, Jul 22, 2009 at 9:44 AM, Sergey Ilinsky<castonet@yahoo.co.uk> wrote:
>
>> > Unlike DOM-Core (and other DOM specs), the DOM-Events
>> specification
>> > seem to be concerned to much with a web-browser/HTML,
>> which is not
>> > what [I think] it should do.
>>
>> I don't think it's unreasonable to have the DOM3 Events
>> spec reflect the current behavior of browsers.  The
>> most recent DOM Core Recommendation is 5 years old, and it's
>> been a busy five years in browser development.
>
> It is not unreasonable to have the DOM3 Events spec reflect the current behavior of browsers. However it is reasonable to keep great DOM API being abstract, that would also conform better to the goals outline in the specification abstract:
>
> "This specification defines the Document Object Model Events Level 3, a generic platform- and language-neutral event system which allows registration of event handlers, describes event flow through a tree structure, and provides basic contextual information for each event."

Personally I think one of the greatest mistakes of the original DOM WG
was the above goal. Designing good APIs for the web is extremely hard.
Trying to additionally design the APIs such that are good for other
platforms as well often results in outright contradicting
requirements. The DOM is a PITA to use for web developers because it
was designed such that it should work in other environments too. Just
look at how vastly popular innerHTML is compared to
createElement/appendChild. And look at how different APIs in
jQuery/prototype/YUI libraries are, compared to the APIs in DOM-Core,
in order to be useable by actual web authors.

If people want generic APIs that aren't just for the web, that's all
well and good, but I don't see why that needs to happen at W3C.

/ Jonas

Received on Monday, 27 July 2009 10:04:12 UTC