- From: Simon Pieters <simonp@opera.com>
- Date: Mon, 21 Nov 2011 11:12:42 +0100
- To: annevk@opera.com, "Andy Earnshaw" <andy@intelligroup.eu>
- Cc: www-dom@w3.org
On Fri, 18 Nov 2011 17:13:31 +0100, Andy Earnshaw <andy@intelligroup.eu>
wrote:
> 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>
> </form>
>
> document.getElementById("myform").remove(); //<-- Error in several
> browsers!
Good catch. We've had problems in this area before (e.g. form.accept).
> 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.
It can't be removed because sites depend on it.
--
Simon Pieters
Opera Software
Received on Monday, 21 November 2011 10:11:05 UTC