- From: Anne van Kesteren <notifications@github.com>
- Date: Sat, 11 Jul 2026 05:08:40 -0700
- To: whatwg/dom <dom@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
- Message-ID: <whatwg/dom/pull/1492@github.com>
Copy a document's base URL when cloning
The baseURI getter now defers to a new "get the base URL" algorithm, which returns null by default and falls back to the node document's URL. HTML overrides this algorithm (to return the document base URL), so DOM no longer reaches into HTML for a value returned by a DOM API.
Cloning a document now copies its base URL into a new "base URL override", so that a shallow clone, which has no base element, still reports the base URL of the document it was cloned from.
Fixes #454.
Tests: https://github.com/web-platform-tests/wpt/pull/61232
- [ ] At least two implementers are interested (and none opposed):
* …
* …
- [x] [Tests](https://github.com/web-platform-tests/wpt) are written and can be reviewed and commented upon at:
* https://github.com/web-platform-tests/wpt/pull/61232 <!-- If these tests are tentative, link a PR to make them non-tentative. -->
- [ ] [Implementation bugs](https://github.com/whatwg/meta/blob/main/MAINTAINERS.md#handling-pull-requests) are filed:
* Chromium: …
* Gecko: …
* WebKit: …
* Deno (only for aborting and events): …
* Node.js (only for aborting and events): …
- [ ] [MDN issue](https://github.com/whatwg/meta/blob/main/MAINTAINERS.md#handling-pull-requests) is filed: …
- [x] The top of this comment includes a [clear commit message](https://github.com/whatwg/meta/blob/main/COMMITTING.md) to use.
(See [WHATWG Working Mode: Changes](https://whatwg.org/working-mode#changes) for more details.)
You can view, comment on, or merge this pull request online at:
https://github.com/whatwg/dom/pull/1492
-- Commit Summary --
* Copy a document's base URL when cloning
-- File Changes --
M dom.bs (27)
-- Patch Links --
https://github.com/whatwg/dom/pull/1492.patch
https://github.com/whatwg/dom/pull/1492.diff
--
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/dom/pull/1492
You are receiving this because you are subscribed to this thread.
Message ID: <whatwg/dom/pull/1492@github.com>
Received on Saturday, 11 July 2026 12:08:45 UTC