W3C home > Mailing lists > Public > public-html@w3.org > June 2009

Re: document[id] and document.id to <element id="id"> matching

From: Ian Hickson <ian@hixie.ch>
Date: Sat, 13 Jun 2009 01:08:28 +0000 (UTC)
To: "Michael A. Puls II" <shadow2531@gmail.com>
Cc: Anne van Kesteren <annevk@opera.com>, public-html@w3.org
Message-ID: <Pine.LNX.4.62.0906130104550.1648@hixie.dreamhostps.com>
On Thu, 4 Jun 2009, Michael A. Puls II wrote:
> > >
> > > document.foo matches <iframe id="foo" name="non-empty"> in IE and 
> > > Opera where the @name value is anything non-empty, not necessarily 
> > > the same value as @id.
> > 
> > Is this required for compatibility?
> 
> I think so, but I don't know how much.

On Thu, 4 Jun 2009, Michael A. Puls II wrote:
>
> In Firefox and Safari, document.id never matches <iframe id="id">. 
> (Although document.id will match <iframe id="id" name="id"> in Safari, 
> but that's name attribute matching)
> 
> In Opera, document.id matches in these 3 cases:
> 
> <iframe id="id">
> <iframe id="id" name="">
> <iframe id="id" name="non-empty"> (where non-empty is any non-empty value and
> not necessarily the same value as the id attribute).
> 
> The problem is that these cases:
> <iframe id="id">
> <iframe id="id" name="">
> 
> match in Opera. No other browser does that. And, the first one causes compat
> problems in at least one wifi ap page.
> 
> Options:
> 
> 1. Make Opera not match on those 2 cases so that Opera matches IE, which 
> would also fix the wifi ap page compat bug.
> 
> 2. Or, follow Firefox and Safari and not match on iframes at all in 
> these cases.
>
>
> So, it's clear which case causes the compat problem. What's not clear is 
> if the spec should follow IE with the id case that it supports or if the 
> spec should keep following Firefox and Safari. I get the feeling that 
> some pages rely on IE's behavior. But, Firefox and Safari are able to 
> get away with it it seems.
> 
> So, I guess the spec should stay as is until there's data that shows the 
> IE case is important.

Ok, I'll leave it as is for now. Thanks!


On Thu, 4 Jun 2009, Michael A. Puls II wrote:
> 
> But, I think in IE7 (as opposed to IE8), <iframe id="id" name=""> 
> matches but <iframe id="id" name> does not

We're definitely not doing that. :-)

-- 
Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'
Received on Saturday, 13 June 2009 01:09:01 UTC

This archive was generated by hypermail 2.3.1 : Monday, 29 September 2014 09:39:04 UTC