This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 23810 - When adopting, "If node is an element, it is affected by a base..."
Summary: When adopting, "If node is an element, it is affected by a base..."
Status: RESOLVED FIXED
Alias: None
Product: WebAppsWG
Classification: Unclassified
Component: DOM (show other bugs)
Version: unspecified
Hardware: PC All
: P2 normal
Target Milestone: ---
Assignee: Anne
QA Contact: public-webapps-bugzilla
URL:
Whiteboard:
Keywords:
Depends on: 20567
Blocks: 24312
  Show dependency treegraph
 
Reported: 2013-11-12 21:27 UTC by Ian 'Hixie' Hickson
Modified: 2014-02-10 11:02 UTC (History)
3 users (show)

See Also:


Attachments

Description Ian 'Hixie' Hickson 2013-11-12 21:27:24 UTC
http://dom.spec.whatwg.org/#interface-document

When adopting, step 3 says "If node is an element, it is affected by a base URL change". But what if it's a DocumentFragment, and it contains Elements? What if it's an Element with children Elements? Are the descendants also so affected?
Comment 1 Anne 2013-11-19 12:07:36 UTC
Yeah, this needs cleaning up.
Comment 2 Anne 2014-02-07 13:16:24 UTC
How about:

1. Let /nodes/ be /node/'s inclusive descendants, in tree order.
2. For each /potentialElement/ in /nodes/, if /potentialElement/ is an element, run its base URL change steps.

I guess I'll change that and fix bug 20976 later as that will revamp the entire way base URLs are done.
Comment 3 Anne 2014-02-07 13:46:53 UTC
https://github.com/whatwg/dom/commit/8b87826a4a153f386152b44c691b9413eed93ed5

Assigning to you Hixie since there's no need anymore for "affected by a base URL change" in DOM.
Comment 4 Ian 'Hixie' Hickson 2014-02-07 17:46:44 UTC
Per our discussion, we're going to have DOM forget about base URL change steps, and instead just notify HTML whenever a node is adopted.
Comment 5 Anne 2014-02-10 11:02:50 UTC
https://github.com/whatwg/dom/commit/e50fd7138f1bf288c4fa0b92f1673359a3affadb

Note that a) you have to cover children yourself and b) timing of when this extension hook runs might change to be a little later to allow for custom elements to work the same way.