Re: [csswg-drafts] [css-font-loading-3] What is the behavior of adding a FontFace to documents.fonts in another document? (#13251)

The CSS Working Group just discussed `[css-font-loading-3] What is the behavior of adding a FontFace to documents.fonts in another document?`, and agreed to the following:

* `RESOLVED: Adding a FontFace to a document other than the one it was created throws an exception`

<details><summary>The full IRC log of that discussion</summary>
&lt;kbabbitt> smfr: this is an issue with font loading api<br>
&lt;kbabbitt> ... possible to make a new FontFace object, add to document.fonts, then also add to a different document<br>
&lt;kbabbitt> ... spec doesn't say anything about cross document additions<br>
&lt;kbabbitt> ... which is weird because font can live in 2 docs at the same time<br>
&lt;kbabbitt> ... impl wise it's tricky because font loading mechanism under the hood needs to live in 2 documents<br>
&lt;kbabbitt> ... behavior across browsers is font doesn't work across documents<br>
&lt;emilio> q+<br>
&lt;TabAtkins> +1 to Simon's proposal, throwing an error when adding cross-document<br>
&lt;kbabbitt> ... proposal is to disallow this and throw a wrong document exception if you try to add font to different document from where it was created<br>
&lt;kbabbitt> +1<br>
&lt;noamr> q+<br>
&lt;Rossen6> ack emilio<br>
&lt;kbabbitt> emilio: agree this seems fine, failing with an exception seems better<br>
&lt;kbabbitt> ... filed a related issue on this a while ago<br>
&lt;kbabbitt> ... my only question is, if you want doc the font-face was created on, ... if you create a font face, don't add it anywhere, then add it to a different document<br>
&lt;kbabbitt> ... I can see that happening<br>
&lt;kbabbitt> smfr: I think you track the document the font face was created in, and if you add in a different one, throw an exception<br>
&lt;kbabbitt> emilio: assuming it's compatible seems fine<br>
&lt;kbabbitt> ... would be curious if you find issues with this, it's due to case where author didn't try to share but just created in one doc and added to another<br>
&lt;kbabbitt> ... sounds good to define as proposing, if we need to relax for web compat we can<br>
&lt;Rossen6> ack noamr<br>
&lt;kbabbitt> noamr: with web compat, we ve had cases in the past where a silent exception turned into a real exception and made sites feel more broken due to JS throwing<br>
&lt;kbabbitt> smfr: reasonable concern, don't think we'll know until we try shipping<br>
&lt;kbabbitt> Rossen6: mostly hearing consensus<br>
&lt;TabAtkins> yes, I think that's the right wording<br>
&lt;kbabbitt> PROPOSED: Adding a FontFace to a document other than the one it was created throws an exception<br>
&lt;kbabbitt> RESOLVED: Adding a FontFace to a document other than the one it was created throws an exception<br>
&lt;TabAtkins> (ugh, gonna have to once again figure out which of the three "document" concepts I need to talk about)<br>
</details>


-- 
GitHub Notification of comment by css-meeting-bot
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/13251#issuecomment-3750655627 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Wednesday, 14 January 2026 17:17:17 UTC