- From: Simon Pieters <simonp@opera.com>
- Date: Tue, 14 Oct 2014 13:00:07 +0200
- To: "Sam Ruby" <rubys@intertwingly.net>, "Anne van Kesteren" <annevk@annevk.nl>
- Cc: whatWG <whatwg@whatwg.org>
On Tue, 14 Oct 2014 12:34:55 +0200, Anne van Kesteren <annevk@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
Received on Tuesday, 14 October 2014 11:00:38 UTC