Re: Improving the DOM; rev 2

On 11/21/2011 11:12 AM, Simon Pieters wrote:
> 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 issue happened recently with input.list: it broke a few websites 
but as far as I know, most of them got fixed. However, I think it would 
be better to try to use .remove() and rename it if it happens to break 
everything.

--
Mounir

Received on Monday, 21 November 2011 10:17:39 UTC