[whatwg] Proposal for a link attribute to replace <a href>

Geoffrey Sneddon foolistbar at googlemail.com
Thu Feb 28 11:19:18 PST 2008

On 28 Feb 2008, at 12:18, Shannon wrote:

> So 'backwards-compatibility', as defined by the same document, can  
> be achieved by using javascript to walk the DOM and add  
> 'window.location(node.getAttribute('link'))' to the onclick handler  
> of any nodes with a link attribute. I have done a very similar thing  
> before to implement :hover on non-anchor elements in IE. Of course  
> an author wouldn't have to use this new attribute at all so  
> backwards-compatibility is the designers choice, not an issue with  
> the proposed attribute.

While yes, you could rely on something like that, it totally breaks in  
any user agent without scripting support. Nothing else, to my  
knowledge, in HTML 5 leads to total loss of functionality without  
JavaScript whatsoever. Nothing else reinvents the wheel for something  
with which we already have a perfectly fine solution already.

You mention in the first email in this thread that this would allow  
nested hyperlinks: altering the content model of the a element would  
allow this too. I don't see it as being a very sensible thing to  
allow, though.

Geoffrey Sneddon

More information about the whatwg mailing list