[Bug 20976] Define Node.baseURI properly

https://www.w3.org/Bugs/Public/show_bug.cgi?id=20976

--- Comment #14 from Anne <annevk@annevk.nl> ---
So nodes have a base URL which is either "inherit" or a parsed URL.

Note: a document's base URL can never be "inherit".

To get a node's parsed base URL you return the closest inclusive ancestor's
base URL that is not "inherit". If there is no such ancestor you return the
node's node document's base URL.

---

Node.prototype.baseURI returns the result of getting a node's parsed base URL,
serialized.

Setting Node.prototype.baseURI on /node/ to /value/ run these steps:

1. Let /base/ be the result of getting /node/'s parsed base URL.

2. Let /url/ be the result of running the URL parser for /value/ against
/base/.

3. If /node/ is a ShadowRoot, set it's base URL to /url/.

4. Otherwise, if /node/ is an Element, set /node/'s "base" attribute to /url/,
serialized.

5. Otherwise, throw a JavaScript TypeError exception.

Note: Changing a document's base URL can only be done through the HTML base
element.

---

Either when an element is created that has a "base" attribute or when an
element's "base" attribute is set, run these steps:

1. Let /base/ be the result of getting element's parsed base URL.

2. Let /url/ be the result of running the URL parser for /value/ against
/base/.

3. Set element's base URL to /url/.

When an element's "base" attribute is removed, set element's base URL to
"inherit".

-- 
You are receiving this mail because:
You are the QA Contact for the bug.

Received on Wednesday, 30 October 2013 16:47:43 UTC