RESOLVED FIXED 128020
<a>/<area>'s origin getter returns "null" rather than "" when URL cannot be parsed
https://bugs.webkit.org/show_bug.cgi?id=128020
Summary <a>/<area>'s origin getter returns "null" rather than "" when URL cannot be p...
Maciej Stachowiak
Reported 2014-01-31 14:41:35 PST
The origin attribute returns null instead of empty on on invalid URL. The URL spec says to return empty.
Attachments
Anne van Kesteren
Comment 1 2023-08-18 03:21:30 PDT
This only applies to the <a> and <area> elements I think (not sure how to construct a URL or Location from a string that cannot be parsed as a URL), but it's still applicable and is probably not difficult to fix: http://software.hixie.ch/utilities/js/live-dom-viewer/?%3C!DOCTYPE%20html%3E%0A...%3Cscript%3E%0Aa%3Ddocument.createElement(%22a%22)%3B%0Aa.href%3D%22https%3A%2F%2Ftest%3Atest%2F%22%3B%0Aw(a.origin)%3B%0A%3C%2Fscript%3E
Radar WebKit Bug Importer
Comment 2 2023-08-18 04:02:26 PDT
Anne van Kesteren
Comment 3 2023-08-18 04:14:42 PDT
EWS
Comment 4 2023-08-24 02:11:08 PDT
Committed 267222@main (0e09f4e4a3b4): <https://commits.webkit.org/267222@main> Reviewed commits have been landed. Closing PR #16830 and removing active labels.
Note You need to log in before you can comment on or make changes to this bug.