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

On Fri, 12 Jun 2009 21:08:28 -0400, Ian Hickson <ian@hixie.ch> wrote:

> 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!

You're welcome!

> 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. :-)

O.K. Cool with me :)


-- 
Michael

Received on Saturday, 13 June 2009 16:40:05 UTC