You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If <var>font face’s</var><adata-link-type=idlhref=#dom-fontface-datatitle=[[data]]>[[Data]]</a> slot is not <code>null</code>,
280
280
set <var>font face’s</var><adata-link-for=FontFacedata-link-type=idlhref=#dom-fontface-statustitle=status>status</a> attribute to "loading",
281
281
and attempt to parse the data in it as a font.
282
-
If this is successful,
283
-
<var>font face</var> now represents the parsed font;
284
-
fulfill <var>font face’s</var><adata-link-type=idlhref=#dom-fontface-fontstatuspromisetitle=[[fontstatuspromise]]>[[FontStatusPromise]]</a> with <var>font face</var>,
285
-
and set its <adata-link-for=FontFacedata-link-type=idlhref=#dom-fontface-statustitle=status>status</a> attribute to "loaded".
286
-
If it is unsuccessful,
287
-
reject <var>font face’s</var><adata-link-type=idlhref=#dom-fontface-fontstatuspromisetitle=[[fontstatuspromise]]>[[FontStatusPromise]]</a> with a SyntaxError
288
-
and set <var>font face’s</var><adata-link-for=FontFacedata-link-type=idlhref=#dom-fontface-statustitle=status>status</a> attribute to "error".
282
+
When this is completed,
283
+
successfully or not,
284
+
await a stable state,
285
+
then run the following steps synchronously:
286
+
287
+
<ol>
288
+
<li>
289
+
If the load was successful,
290
+
<var>font face</var> now represents the parsed font;
291
+
fulfill <var>font face’s</var><adata-link-type=idlhref=#dom-fontface-fontstatuspromisetitle=[[fontstatuspromise]]>[[FontStatusPromise]]</a> with <var>font face</var>,
292
+
and set its <adata-link-for=FontFacedata-link-type=idlhref=#dom-fontface-statustitle=status>status</a> attribute to "loaded".
293
+
294
+
<li>
295
+
Otherwise,
296
+
reject <var>font face’s</var><adata-link-type=idlhref=#dom-fontface-fontstatuspromisetitle=[[fontstatuspromise]]>[[FontStatusPromise]]</a> with a SyntaxError
297
+
and set <var>font face’s</var><adata-link-for=FontFacedata-link-type=idlhref=#dom-fontface-statustitle=status>status</a> attribute to "error".
298
+
</ol>
289
299
</ol>
290
300
291
301
<pclass=note>Note: Newly constructed FontFace objects are not automatically added
as if it was the value of a <aclass=cssdata-link-type=maybehref=http://www.w3.org/TR/css-fonts-3/#at-font-face-ruletitle=@font-face>@font-face</a> rule’s <aclass=propertydata-link-type=propdeschref=http://www.w3.org/TR/css-fonts-3/#descdef-srctitle=src>src</a> descriptor.
330
340
331
341
</var><li>
332
-
If the attempt to load fails,
333
-
reject <var>font face’s</var><adata-link-type=idlhref=#dom-fontface-fontstatuspromisetitle=[[fontstatuspromise]]>[[FontStatusPromise]]</a> with a NetworkError
334
-
and set <var>font face’s</var><adata-link-for=FontFacedata-link-type=idlhref=#dom-fontface-statustitle=status>status</a> attribute to "error".
335
-
336
-
<li>
337
-
Otherwise,
338
-
<var>font face</var> now represents the loaded font;
339
-
fulfill <var>font face’s</var><adata-link-type=idlhref=#dom-fontface-fontstatuspromisetitle=[[fontstatuspromise]]>[[FontStatusPromise]]</a> with <var>font face</var>
340
-
and set <var>font face’s</var><adata-link-for=FontFacedata-link-type=idlhref=#dom-fontface-statustitle=status>status</a> attribute to "loaded".
342
+
When the load operation completes,
343
+
successfully or not,
344
+
await a stable state,
345
+
then run the following steps synchronously:
346
+
347
+
<ol>
348
+
<li>
349
+
If the attempt to load fails,
350
+
reject <var>font face’s</var><adata-link-type=idlhref=#dom-fontface-fontstatuspromisetitle=[[fontstatuspromise]]>[[FontStatusPromise]]</a> with a NetworkError
351
+
and set <var>font face’s</var><adata-link-for=FontFacedata-link-type=idlhref=#dom-fontface-statustitle=status>status</a> attribute to "error".
352
+
353
+
<li>
354
+
Otherwise,
355
+
<var>font face</var> now represents the loaded font;
356
+
fulfill <var>font face’s</var><adata-link-type=idlhref=#dom-fontface-fontstatuspromisetitle=[[fontstatuspromise]]>[[FontStatusPromise]]</a> with <var>font face</var>
357
+
and set <var>font face’s</var><adata-link-for=FontFacedata-link-type=idlhref=#dom-fontface-statustitle=status>status</a> attribute to "loaded".
358
+
</ol>
341
359
</ol>
342
360
343
361
<p>User agents can initiate font loads on their own,
For all of the font faces in the <var>font face list</var>,
668
-
call their <aclass=idl-codedata-link-for=FontFacedata-link-type=methodhref=#dom-fontface-loadtitle=load()>load()</a> method.
669
-
670
-
<li>
671
-
Resolve <var>promise</var> with the result of
672
-
waiting for all of the <aclass=idl-codedata-link-type=attributehref=#dom-fontface-fontstatuspromisetitle=[[fontstatuspromise]]>[[FontStatusPromise]]</a>s of each font face in the <var>font face list</var>, in order.
685
+
Await a stable state,
686
+
then run the following steps synchronously:
687
+
688
+
<ol>
689
+
<li>
690
+
For all of the font faces in the <var>font face list</var>,
691
+
call their <aclass=idl-codedata-link-for=FontFacedata-link-type=methodhref=#dom-fontface-loadtitle=load()>load()</a> method.
692
+
693
+
<li>
694
+
Resolve <var>promise</var> with the result of
695
+
waiting for all of the <aclass=idl-codedata-link-type=attributehref=#dom-fontface-fontstatuspromisetitle=[[fontstatuspromise]]>[[FontStatusPromise]]</a>s of each font face in the <var>font face list</var>, in order.
0 commit comments