On Tue, 14 Oct 2014 12:34:55 +0200, Anne van Kesteren <ann...@annevk.nl>
wrote:
If you could be so kind as to point out what I am missing, I would
appreciate it.
The way the <a> element works, I assume. Which is mostly how URLUtils
works when associated with an object that is not URL.
[[
The a element also supports the URLUtils interface. [URL]
When the element is created, and whenever the element's href content
attribute is set, changed, or removed, the user agent must invoke the
element's URLUtils interface's set the input algorithm with the value of
the href content attribute, if any, or the empty string otherwise, as the
given value.
]]
https://html.spec.whatwg.org/multipage/semantics.html#the-a-element
-> set the input
[[
1. Set url to null.
...
4. If url is not failure, set url to url.
]]
https://url.spec.whatwg.org/#concept-urlutils-set-the-input
When /url/ is failure, https://url.spec.whatwg.org/#concept-urlutils-url
is null. So:
.href:
[[
1. If url is null, return input.
]]
https://url.spec.whatwg.org/#dom-url-href
.protocol:
[[
1. If url is null, return ":".
]]
https://url.spec.whatwg.org/#dom-url-protocol
...and the other attributes return empty string in the first step if url
is null.
Does that help?
--
Simon Pieters
Opera Software