[Bug 20976] Define Node.baseURI properly

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

Elliott Sprehn <esprehn@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |adamk@chromium.org,
                   |                            |dglazkov@chromium.org,
                   |                            |esprehn@gmail.com,
                   |                            |sjmiles@chromium.org

--- Comment #8 from Elliott Sprehn <esprehn@gmail.com> ---
This has come up recently with developers using Shadow DOM and Web Components
who wish to be able to scope elements with the base uri of the HTML import that
defined them.

Specifically they want to be able to make a custom element defined in an
imported document use the correct baseURI when instances are created and their
ShadowRoots are populated with <img>'s or nested stylesheets are processed.

After a lot of discussion it seems Node.baesURI is the best approach for them
(and provides the most flexibility). We'd like to change the spec to:

Node.baseURI on reading:
- walks up the tree until it encounters:
   a ShadowRoot with a baseURI property that is not empty.
   a Element with a base attribute that is not empty.
- else it returns the Document's baseURI (as computed with <base>).

Node.baseURI on setting:
- If ShadowRoot then set the property.
- If Element then set the base attribute.
- else throw an exception.

We can also fix the nonsensical result upon reading as observed in Anne's
comment.

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

Received on Tuesday, 29 October 2013 20:49:19 UTC