- From: Boris Zbarsky <bzbarsky@MIT.EDU>
- Date: Wed, 18 Feb 2009 11:29:05 -0500
- To: Julian Reschke <julian.reschke@gmx.de>
- CC: HTML WG <public-html@w3.org>
Julian Reschke wrote: > So @id and @name are handled differently? Why? The special name handling is only needed for names that are %-encoded. Names are, by and large, only %-encoded because of IE's matching behavior and because fragment IDs in URIs come %-encoded. There are no %-encoded IDs around, typically. Probably because there is not much use of them for fragment identifier matching. The other reason, of course, is that the name handling _does_ cost extra parsing performance and changes the name attribute visible in the DOM. That was viewed as acceptable for IE compat on the issue of anchor matching, but making the same change to IDs would possibly affect getElementById (if the ID contains '%'). That was not viewed as desirable. In short, "because the name handling is a hack we felt we needed for IE compat". -Boris
Received on Wednesday, 18 February 2009 16:29:50 UTC