W3C home > Mailing lists > Public > www-style@w3.org > August 2010

Re: NodeSelector, :visited, and :link

From: Garrett Smith <dhtmlkitchen@gmail.com>
Date: Sun, 22 Aug 2010 23:04:09 -0700
Message-ID: <AANLkTi=mtn_Ejs+UvZt2iYWXmqeSDxRBda2OTnXrTtJ6@mail.gmail.com>
To: Boris Zbarsky <bzbarsky@mit.edu>
Cc: Patrick Garies <pgaries@fastmail.us>, www-style <www-style@w3.org>
On 8/22/10, Boris Zbarsky <bzbarsky@mit.edu> wrote:
> On 8/22/10 10:02 PM, Garrett Smith wrote:
>> On 8/22/10, Boris Zbarsky<bzbarsky@mit.edu>  wrote:
>>> On 8/22/10 7:38 PM, Patrick Garies wrote:
>>>> On 2010-08-18 9:45 PM, Garrett Smith wrote:
>>>>> Do any browsers return just visited links for
>>>>> document.querySelectorAll(":visited").
>>>>
>>>> Firefox 3.6 and Opera 10.6 do; they match links based on their
>>>> visited/unvisited state including |link| element links.
>>>
>>> Note that Firefox 4.0 will no longer do this; the NodeSelector methods
>>> will treat all links as unvisited.  The definition of "link" in this
>>> context is unaffected by this behavior change (so includes<html:a>,
>>> <html:link>,<html:area>,<svg:a>).
>>>
>> What's the consequences of MUST'ing this into the spec?
>
> What does "this" refer to in this context?
>
It refers to what is specified for :visited and :link, as described in
Selectors API Level 1.
<http://www.w3.org/TR/selectors-api/>

  "As defined in Selectors ([SELECT], section 6.6.1), user agents may
treat all links as unvisited links. It is recommended that
implementations behave consistently with other uses of Selectors
supported by the user agent."

to:
 "user agents must treat all links as unvisited links. Authors should
be advised that some older user agents match visited links with
:visited and unvisited links with :link."

Essentially along the lines of codifying the behavior. What's the
point in a feature that is designed to be not interoperable? What if
IE handles it one way while four browsers handle it another way, and
then, say, an author decides that IE is buggy and thus not worth
supporting, or, worse yet, uses one of those NFD (native-first dual)
query engines (where the fallback either supports it, returns every
element, returns no elements, or throws an error).

See also LH's comments:
<http://lists.w3.org/Archives/Public/public-webapi/2008Apr/0134.html>

Garrett
Received on Monday, 23 August 2010 06:04:37 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:20:30 GMT