Re: NodeSelector, :visited, and :link

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 UTC