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

Re: Improving the DOM; rev 2

From: Boris Zbarsky <bzbarsky@MIT.EDU>
Date: Mon, 21 Nov 2011 07:56:30 -0500
Message-ID: <4ECA4A7E.90901@mit.edu>
To: www-dom@w3.org
On 11/21/11 5:17 AM, Mounir Lamouri wrote:
> 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.

Note that there is an important difference here between the issues 
caused by .list and the issue raised by Andy.

Andy's issue is that new code using the new methods could break for some 
elements.  In particular, I think forms and documents are the only nodes 
that do the random name lookup thing and could have issues with the new 
properties being shadowed by existing elements.

On the other han, the .list issue, which also applies to .remove() and 
company, is that any code like this:

   <script>function remove(id) { /* stuff */ }</script>
   <div onclick="remove(this.id)">Click me</div>

works right now but will break with this change.

This has already been an issue with .list, with .contextMenu (see 
https://bugzilla.mozilla.org/show_bug.cgi?id=701328 which bit some sort 
of intranet-facing web app), and is likely to happen any time we add any 
new properties on elements or documents.  The shorter the names, the 
more likely the compat issues.

Going forward, we should be encouraging authors to follow 
but getting there will take some work.  :(

Received on Monday, 21 November 2011 12:57:02 UTC

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