Skip to content

Commit 39b37f0

Browse files
committed
[css-font-loading] Async algos are hard, yo.
1 parent 6bbec16 commit 39b37f0

File tree

1 file changed

+7
-9
lines changed

1 file changed

+7
-9
lines changed

css-font-loading/Overview.bs

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -657,16 +657,14 @@ Events</h3>
657657

658658
5. Queue a task to perform the following steps synchronously:
659659

660-
1. <a>Fire a font load event</a> named {{loadingdone}} at <var>font face set</var>
661-
with the (possibly empty) contents of <var>font face set's</var> {{[[LoadedFonts]]}} slot.
662-
2. Reset the {{[[LoadedFonts]]}} slot to an empty list.
663-
664-
6. Queue a task to perform the following steps synchronously:
665-
666-
1. If <var>font face set's</var> {{[[FailedFonts]]}} slots is non-empty,
660+
1. Let <var>loaded fonts</var> be the (possibly empty) contents of <var>font face set's</var> {{[[LoadedFonts]]}} slot.
661+
2. Let <var>failed fonts</var> be the (possibly empty) contents of <var>font face set's</var> {{[[FailedFonts]]}} slot.
662+
3. Reset the {{[[LoadedFonts]]}} and {{[[FailedFonts]]}} slots to empty lists.
663+
4. <a>Fire a font load event</a> named {{loadingdone}} at <var>font face set</var>
664+
with <var>loaded fonts</var>.
665+
5. If <var>font face set's</var> <var>failed fonts</var> is non-empty,
667666
<a>fire a font load event</a> named {{loadingerror}} at <var>font face set</var>
668-
with the contents of <var>font face set's</var> {{[[FailedFonts]]}} slot.
669-
2. Reset the {{[[FailedFonts]]}} slot to an empty list.
667+
with <var>failed fonts</var>.
670668

671669
Whenever a {{FontFaceSet}} goes from <a>pending on the environment</a> to not <a>pending on the environment</a>,
672670
the user agent must run the following steps:

0 commit comments

Comments
 (0)