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

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

From: Michael A. Puls II <shadow2531@gmail.com>
Date: Thu, 04 Jun 2009 06:49:30 -0400
To: "Ian Hickson" <ian@hixie.ch>, "Anne van Kesteren" <annevk@opera.com>
Cc: public-html@w3.org
Message-ID: <op.uuzxoqhx1ejg13@sandra-svwliu01>
On Thu, 04 Jun 2009 00:31:15 -0400, Michael A. Puls II  
<shadow2531@gmail.com> wrote:

> On Wed, 03 Jun 2009 15:06:15 -0400, Ian Hickson <ian@hixie.ch> wrote:
>
>> On Mon, 6 Apr 2009, Michael A. Puls II wrote:
>>> FYI though: opera matching for <iframe id="test"> (IFRAME (as Window
>>> object) with no @name) seems to be a compatibility problem with at  
>>> least
>>> some pages on at least one Wifi AP.
>>
>> The spec doesn't match that case, right?
>
> Right.
>
>> Am I right to understand that
>> that is the more compatible thing for this Wifi AP?
>
> That's what I was told from the person that has the AP. I can try and  
> get the brand, model name and firmware version.

To clarify, Opera doing what it does in the exact case above is less  
compatible and what causes the ap problem. But, the spec isn't exactly  
compatible with IE either.

To be extra clear, this is the relevant part of Opera Bug CORE-20088 that  
I filed a while ago:

--------
In IE, document.id matches <iframe id="id" name="non-empty> (where  
non-empty is any non-empty value and not necessarily the same value as the  
id attribute).

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.

Btw, this is the ap: D-Link DWL-3200AP (B1 hardware) with v2.41 firmware  
that gives Opera trouble because of the case mentioned above.

Hope that helps.

-- 
Michael
Received on Thursday, 4 June 2009 10:50:12 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 9 May 2012 00:16:38 GMT