- From: Simon Fraser via GitHub <noreply@w3.org>
- Date: Fri, 19 Dec 2025 19:28:16 +0000
- To: public-css-archive@w3.org
smfr has just created a new issue for https://github.com/w3c/csswg-drafts:
== [css-font-loading-3] What is the behavior of adding a FontFace to documents.fonts in another document? ==
Consider:
```
const font = new FontFace("WebFont", "url('../../resources/Ahem.ttf') format('truetype')");
document.fonts.add(font);
document.getElementById("target").contentWindow.document.fonts.add(font);
font.load();
```
https://drafts.csswg.org/css-font-loading/#dom-fontfaceset-add doesn't say what happens when the `FontFace` already belongs to `document.fonts` in another document (assuming it's not CSS-connected).
Generally, WebKit doesn't support any active DOM object living in two documents at the same time, so we'd prefer that the `FontFace` is removed from `document.fonts` in the old document.
However, all browsers currently allow the `FontFace` to exist in both documents at the same time, and calling `load()` changes its status in both documents (however, in Chrome, the font disappears from the new `document.fonts` after load).
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/13251 using your GitHub account
--
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Friday, 19 December 2025 19:28:17 UTC