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

>    a:matches([href^="http:"], [href^="https:"], [href^="data:"])
Don't forget that links could be local, and href being an attribute matches the markup code, not the final link. How would you distinguish href="./" and href="data.html", for example? Your only option would be to use a RegExp (/^\w+:.*/i) and :not() but this is not possible, to catch all relative links, then add some exceptions to links whose protocol is known to be navigational (http(s)/ftp/data).  Also, some browsers accept to navigate to FTP locations so these would be another navigation link. It's not up to the site author to list all the supported navigation links, all the supported action links, and it depends from browser to browser anyway. For example, "res:" is a valid navigational protocol in IE, but not in Chrome. 		 	   		  

Received on Tuesday, 7 May 2013 07:11:28 UTC