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
they must act as if they had called the corresponding <aclass=idl-codedata-link-type=interfacehref=#dom-fontfacetitle=fontface>FontFace</a>’s <aclass=idl-codedata-link-for=FontFacedata-link-type=methodhref=#dom-fontface-loadtitle=load()>load()</a> method described here.
The <code>ready()</code> method</span><aclass=self-linkhref=#font-face-ready></a></h3>
339
-
340
-
<p> The <aclass=idl-codedata-link-for=FontFacedata-link-type=methodhref=#dom-fontface-readytitle=ready()>ready()</a> method of <aclass=idl-codedata-link-type=interfacehref=#dom-fontfacetitle=fontface>FontFace</a>
341
-
returns a <adata-link-type=idlhref=#dom-promisetitle=promise>Promise</a>
342
-
which is fulfilled when the font face is successfully loaded,
343
-
or rejected when the font face fails to load or parse successfully.
344
-
345
-
<p> When the <dfnclass=idl-codedata-dfn-for=FontFacedata-dfn-type=methoddata-export="" id=dom-fontface-ready>ready()<aclass=self-linkhref=#dom-fontface-ready></a></dfn> method is called,
346
-
execute these steps:
347
-
348
-
<oldata-link-type=idl>
349
-
<li>
350
-
Let <var>font face</var> be the <adata-link-type=idlhref=#dom-fontfacetitle=fontface>FontFace</a> object on which this method was called.
351
-
352
-
<li>
353
-
Let <var>ready promise</var> be a newly-created <adata-link-type=idlhref=#dom-promisetitle=promise>Promise</a> object.
354
-
355
-
<li>
356
-
Resolve <var>ready promise</var> with <var>font face’s</var><aclass=idl-codedata-link-type=attributehref=#dom-fontface-fontstatuspromisetitle=[fontstatuspromise]>[FontStatusPromise]</a>.
Interaction with CSS’s <aclass=cssdata-link-type=maybehref=http://www.w3.org/TR/css-fonts-3/#at-font-face-ruletitle=@font-face>@font-face</a> Rule</span><aclass=self-linkhref=#font-face-css-connection></a></h3>
364
338
365
339
<p> A CSS <aclass=cssdata-link-type=maybehref=http://www.w3.org/TR/css-fonts-3/#at-font-face-ruletitle=@font-face>@font-face</a> rule automatically defines a corresponding <aclass=idl-codedata-link-type=interfacehref=#dom-fontfacetitle=fontface>FontFace</a> object,
<pclass=note> Note: Note that the Promise returned by this <aclass=idl-codedata-link-for=FontFaceSetdata-link-type=methodhref=#dom-fontfaceset-readytitle=ready()>ready()</a> method is only ever fulfilled,
773
747
never rejected,
774
-
unlike the Promise returned by the <aclass=idl-codedata-link-type=interfacehref=#dom-fontfacetitle=fontface>FontFace</a><aclass=idl-codedata-link-for=FontFacedata-link-type=methodhref=#dom-fontface-readytitle=ready()>ready()</a> method.
748
+
unlike the Promise returned by the <aclass=idl-codedata-link-type=interfacehref=#dom-fontfacetitle=fontface>FontFace</a><aclass=idl-codedata-link-for=FontFacedata-link-type=methodhref=#dom-fontface-loadtitle=load()>load()</a> method.
0 commit comments