Re: [selectors4] Local-link, <base> and javascript

On Mon, May 6, 2013 at 12:31 PM, François REMY
<francois.remy.dev@outlook.com> wrote:
> Some quick comments to make about the local-link pseudo-class:
>
>    (1) Shouldn’t we consider the <base> tag as the document root URL? If we
> save a document on our hard drive, some browsers add a <BASE> tag to make
> sure the relative urls keep working, so maybe :local-link should consider
> that too.

It matches on the absolutized urls.  Host languages can do whatever
they want to produce absolutized urls; HTML uses <base>.

>    (2) What happens if a virtual navigation occurs (via history.pushState);
> according to me we should maybe consider the ‘displayed’ url and not the
> real one, otherwise this could cause confusion (hitting reload would make
> the applied style change).

That's up to the host language; again, we just care about absolute urls.

>    (3) Are ‘javascript:void(0)” links considered non-local? external?
> shouldn’t we make a not saying that an external link looks like
> :any-link:not(:local-link(0), [href^=javascript])?

When absolutized, they won't match the document url, whatever it is.

~TJ

Received on Monday, 6 May 2013 19:46:59 UTC