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

Re: NodeSelector, :visited, and :link

From: Patrick Garies <pgaries@fastmail.us>
Date: Sun, 22 Aug 2010 18:38:42 -0500
Message-ID: <4C71B502.2020809@fastmail.us>
To: Garrett Smith <dhtmlkitchen@gmail.com>
CC: www-style <www-style@w3.org>
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.

(The above browsers mark a style sheet used to display the document as
unvisited, but that's a CSS2.1/CSS3 Selectors issue. It's not clear in
CSS2.1/CSS3 Selectors if the mere display of the style sheet counts as
"visited by the user".)

> Likewise, do any browsers return just unvisited links for ":link"?
>
> This behavior is allowed, but specified as being optional.

Chrome 6 (beta), Internet Explorer 8, Internet Explorer 9 Platform
Preview 4, and Safari 5 all appear to comply with the spec by exercising
the option specified in the "MAY" clause and ignoring the following
"RECOMMENDED" clause; they treat all links as unvisited. They don't
match HTML |link| elements in any state though.

Test document attached.


Received on Sunday, 22 August 2010 23:39:12 GMT

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