W3C home > Mailing lists > Public > www-dom@w3.org > October to December 2011

Re: Improving the DOM; rev 2

From: Andy Earnshaw <andy@intelligroup.eu>
Date: Fri, 18 Nov 2011 16:13:31 -0000
To: <annevk@opera.com>
Cc: <www-dom@w3.org>
Message-ID: <074101cca60d$0466e6a0$0d34b3e0$@intelligroup.eu>
I like the idea, but the first problem that springs to mind is that we're
increasing the number of potential collisions that can be caused by the way
certain elements are registered as named properties on others:

    <form id="myform">
      <button name="remove">Remove</button>

    document.getElementById("myform").remove();  //<-- Error in several

This problem already exists with element methods that have short names, like
`submit`, and I fear that by adding more short names like `remove`,
`append`, etc, we're just increasing the potential for people to run into
this problem.  Of course, if browsers remove this silly behaviour and just
use the `.elements` collection, then it wouldn't be a problem at all.
Received on Monday, 21 November 2011 07:49:37 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 22:36:59 UTC