[csswg-drafts] [css-font-loading] FontFaceSet.load() promise rejections (#7680)

litherum has just created a new issue for https://github.com/w3c/csswg-drafts:

== [css-font-loading] FontFaceSet.load() promise rejections ==
The spec [says](https://drafts.csswg.org/css-font-loading-3/#dom-fontfaceset-load):

> 3. [Find the matching font faces](https://drafts.csswg.org/css-font-loading-3/#find-the-matching-font-faces) from font face set using the [font](https://www.w3.org/TR/css-font-loading-3/#dom-fontfacesetload-font) and [text](https://www.w3.org/TR/css-font-loading-3/#dom-fontfacesetload-text) arguments passed to the function, and let font face list be the return value (ignoring the found faces flag). If a syntax error was returned, reject promise with a SyntaxError exception and terminate these steps.
> 4. Queue a task to run the following steps synchronously:
>     1. For all of the font faces in the font face list, call their [load()](https://drafts.csswg.org/css-font-loading-3/#dom-fontface-load) method.
>     2. Resolve promise with the result of waiting for all of the [[[FontStatusPromise]]](https://drafts.csswg.org/css-font-loading-3/#dom-fontface-fontstatuspromise-slot)s of each font face in the font face list, in order.

However, this is not, in fact, what (all) browsers do. This text indicates that either A) the string passed to `load()` is a syntax error, or the promise is resolved (rather than rejected). However, WebKit, Chrome, and Firefox all reject the promise if no fonts were able to be loaded.

I suggest we make the spec match what is de-facto true in browsers.

[test.html.zip](https://github.com/w3c/csswg-drafts/files/9480980/test.html.zip)

Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/7680 using your GitHub account


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

Received on Friday, 2 September 2022 20:44:46 UTC