This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 27047 - There should be a difference between a having an href attribute and a not having an href attribute. See bug 27022 comment 0.
Summary: There should be a difference between a having an href attribute and a not hav...
Status: RESOLVED FIXED
Alias: None
Product: WHATWG
Classification: Unclassified
Component: HTML (show other bugs)
Version: unspecified
Hardware: Other other
: P3 normal
Target Milestone: Unsorted
Assignee: Ian 'Hixie' Hickson
QA Contact: contributor
URL: https://html.spec.whatwg.org/#the-a-e...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-10-14 14:33 UTC by contributor
Modified: 2014-11-26 20:39 UTC (History)
4 users (show)

See Also:


Attachments

Description contributor 2014-10-14 14:33:54 UTC
Specification: https://html.spec.whatwg.org/multipage/semantics.html
Multipage: https://html.spec.whatwg.org/multipage/#the-a-element
Complete: https://html.spec.whatwg.org/#the-a-element
Referrer: https://html.spec.whatwg.org/multipage/

Comment:
There should be a difference between a having an href attribute and a not
having an href attribute. See bug 27022 comment 0.

Posted from: 46.127.136.57 by annevk@annevk.nl
User agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:35.0) Gecko/20100101 Firefox/35.0
Comment 1 Ian 'Hixie' Hickson 2014-10-14 21:28:17 UTC
I don't understand. There already is a difference; one has a hyperlink and the other not. What difference do you want?
Comment 2 Anne 2014-10-15 07:14:23 UTC
As the linked comment says, the situation is that HTML invokes "set the input" whenever href changes, even removed, with the empty string argument. However, the empty string is sufficient to get a URL and <a>.href should not return a URL if href="" is missing.
Comment 3 Ian 'Hixie' Hickson 2014-10-15 18:32:15 UTC
So what do I set the input to then, when the attribute is missing?
Comment 4 Anne 2014-10-16 09:53:41 UTC
I guess I'll make null work as a special value that does the right thing.
Comment 6 contributor 2014-11-26 20:39:13 UTC
Checked in as WHATWG revision r8858.
Check-in comment: removing an href='' attribute affects URLUtils differently than setting it to ''.
https://html5.org/tools/web-apps-tracker?from=8857&to=8858