@@ -70,6 +70,8 @@ <h2 class="no-num no-toc no-ref heading settled heading" id=status><span class=c
7070< h2 class ="no-num no-toc no-ref heading settled heading " id =contents > < span class =content > Table of Contents</ span > </ h2 >
7171< div data-fill-with =table-of-contents > < ul class =toc >
7272 < li > < a href =#introduction > < span class =secno > 1</ span > Introduction</ a >
73+ < ul class =toc >
74+ < li > < a href =#values > < span class =secno > 1.1</ span > Values</ a > </ ul >
7375 < li > < a href =#fontface-interface > < span class =secno > 2</ span > The < code > FontFace</ code > Interface</ a >
7476 < ul class =toc >
7577 < li > < a href =#font-face-constructor > < span class =secno > 2.1</ span > The Constructor</ a >
@@ -128,6 +130,14 @@ <h2 class="heading settled heading" data-level=1 id=introduction><span class=sec
128130 It also provides methods to track the loading status of an individual font,
129131 or of all the fonts on an entire page.
130132
133+ < h3 class ="heading settled heading " data-level =1.1 id =values > < span class =secno > 1.1 </ span > < span class =content >
134+ Values</ span > < a class =self-link href =#values > </ a > </ h3 >
135+
136+ < p > This specification uses < dfn class =idl-code data-dfn-type =interface data-export ="" id =dom-promise title =Promise > Promises< a class =self-link href =#dom-promise > </ a > </ dfn > .
137+ Promises are currently defined by < a href =https://github.com/domenic/promises-unwrapping > Domenic Denicola’s spec</ a > ,
138+ but when TC39 is finished adding them to ECMAScript 6 their definition should be used instead.
139+ HTML5Rocks has some < a href =http://www.html5rocks.com/en/tutorials/es6/promises/ > good tutorial material introducing Promises</ a > .
140+
131141< h2 class ="heading settled heading " data-level =2 id =fontface-interface > < span class =secno > 2 </ span > < span class =content >
132142The < code > FontFace</ code > Interface</ span > < a class =self-link href =#fontface-interface > </ a > </ h2 >
133143
@@ -167,7 +177,7 @@ <h2 class="heading settled heading" data-level=2 id=fontface-interface><span cla
167177
168178 // Returns a promise that fulfills or rejects when the font face
169179 // reached "loaded" or "error" status.
170- < a data-link-type =idl title =promise > Promise</ a > < a class =idl-code data-global-name ="FontFace<interface>/ready()<method> " data-link-for =FontFace data-link-type =method href =#dom-fontface-ready title =ready() > ready</ a > ();
180+ < a data-link-type =idl href = #dom-promise title =promise > Promise</ a > < a class =idl-code data-global-name ="FontFace<interface>/ready()<method> " data-link-for =FontFace data-link-type =method href =#dom-fontface-ready title =ready() > ready</ a > ();
171181 };
172182</ pre >
173183 < dl data-dfn-for =FontFace data-dfn-type =attribute >
@@ -232,7 +242,7 @@ <h3 class="heading settled heading" data-level=2.1 id=font-face-constructor><spa
232242 < li >
233243 Let < var > font face</ var > be a fresh < a data-link-type =idl href =#dom-fontface title =fontface > FontFace</ a > object.
234244 Set < var > font face’s</ var > < a data-link-for =FontFace data-link-type =idl href =#dom-fontface-status title =status > status</ a > argument to < code > "unloaded"</ code > .
235- Set its internal < a data-link-type =idl href =#dom-fontface-fontstatuspromise title =[fontstatuspromise] > [FontStatusPromise]</ a > attribute to a newly-created promise object.
245+ Set its internal < a data-link-type =idl href =#dom-fontface-fontstatuspromise title =[fontstatuspromise] > [FontStatusPromise]</ a > attribute to a newly-created < a data-link-type = idl href = #dom- promise title = promise > Promise </ a > object.
236246 Return < var > font face</ var > ,
237247 and complete the rest of these steps asynchronously.
238248
@@ -333,7 +343,7 @@ <h3 class="heading settled heading" data-level=2.3 id=font-face-ready><span clas
333343The < code > ready()</ code > method</ span > < a class =self-link href =#font-face-ready > </ a > </ h3 >
334344
335345< p > The < a class =idl-code data-link-for =FontFace data-link-type =method href =#dom-fontface-ready title =ready() > ready()</ a > method of < a class =idl-code data-link-type =interface href =#dom-fontface title =fontface > FontFace</ a >
336- returns a Promise
346+ returns a < a data-link-type = idl href = #dom-promise title = promise > Promise</ a >
337347 which is fulfilled when the font face is successfully loaded,
338348 or rejected when the font face fails to load or parse successfully.
339349
@@ -345,7 +355,7 @@ <h3 class="heading settled heading" data-level=2.3 id=font-face-ready><span clas
345355 Let < var > font face</ var > be the < a data-link-type =idl href =#dom-fontface title =fontface > FontFace</ a > object on which this method was called.
346356
347357 < li >
348- Let < var > ready promise</ var > be a newly-created promise object.
358+ Let < var > ready promise</ var > be a newly-created < a data-link-type = idl href = #dom- promise title = promise > Promise </ a > object.
349359
350360 < li >
351361 Resolve < var > ready promise</ var > with < var > font face’s</ var > < a class =idl-code data-link-type =attribute href =#dom-fontface-fontstatuspromise title =[fontstatuspromise] > [FontStatusPromise]</ a > .
@@ -404,14 +414,14 @@ <h2 class="heading settled heading" data-level=3 id=FontFaceSet-interface><span
404414
405415 // check and start loads if appropriate
406416 // and fulfill promise when all loads complete
407- < a data-link-type =idl title =promise > Promise</ a > < a class =idl-code data-global-name ="FontFaceSet<interface>/load()<method> " data-link-for =FontFaceSet data-link-type =method href =#dom-fontfaceset-load title =load() > load</ a > (DOMString < a class =idl-code data-global-name ="FontFaceSet<interface>/load()<method>/font<argument> " data-link-for =FontFaceSet/load() data-link-type =argument href =#dom-fontfacesetload-font title =font > font</ a > , optional DOMString < a class =idl-code data-global-name ="FontFaceSet<interface>/load()<method>/text<argument> " data-link-for =FontFaceSet/load() data-link-type =argument href =#dom-fontfacesetload-text title =text > text</ a > = " ");
417+ < a data-link-type =idl href = #dom-promise title =promise > Promise</ a > < a class =idl-code data-global-name ="FontFaceSet<interface>/load()<method> " data-link-for =FontFaceSet data-link-type =method href =#dom-fontfaceset-load title =load() > load</ a > (DOMString < a class =idl-code data-global-name ="FontFaceSet<interface>/load()<method>/font<argument> " data-link-for =FontFaceSet/load() data-link-type =argument href =#dom-fontfacesetload-font title =font > font</ a > , optional DOMString < a class =idl-code data-global-name ="FontFaceSet<interface>/load()<method>/text<argument> " data-link-for =FontFaceSet/load() data-link-type =argument href =#dom-fontfacesetload-text title =text > text</ a > = " ");
408418
409419 // return whether all fonts in the fontlist are loaded
410420 // (does not initiate load if not available)
411421 boolean < a class =idl-code data-global-name ="FontFaceSet<interface>/check()<method> " data-link-for =FontFaceSet data-link-type =method href =#dom-fontfaceset-check title =check() > check</ a > (DOMString < a class =idl-code data-global-name ="FontFaceSet<interface>/check()<method>/font<argument> " data-link-for =FontFaceSet/check() data-link-type =argument href =#dom-fontfacesetcheck-font title =font > font</ a > , optional DOMString < a class =idl-code data-global-name ="FontFaceSet<interface>/check()<method>/text<argument> " data-link-for =FontFaceSet/check() data-link-type =argument href =#dom-fontfacesetcheck-text title =text > text</ a > = " ");
412422
413423 // async notification that font loading and layout operations are done
414- < a data-link-type =idl title =promise > Promise</ a > < a class =idl-code data-global-name ="FontFaceSet<interface>/ready()<method> " data-link-for =FontFaceSet data-link-type =method href =#dom-fontfaceset-ready title =ready() > ready</ a > ();
424+ < a data-link-type =idl href = #dom-promise title =promise > Promise</ a > < a class =idl-code data-global-name ="FontFaceSet<interface>/ready()<method> " data-link-for =FontFaceSet data-link-type =method href =#dom-fontfaceset-ready title =ready() > ready</ a > ();
415425
416426 // loading state, "loading" while one or more fonts loading, "loaded" otherwise
417427 readonly attribute < a data-link-type =idl href =#enumdef-fontfaceloadstatus title =fontfaceloadstatus > FontFaceLoadStatus</ a > < a class =idl-code data-global-name ="FontFaceSet<interface>/status<attribute> " data-link-for =FontFaceSet data-link-type =attribute href =#dom-fontfaceset-status title =status > status</ a > ;
@@ -1101,6 +1111,7 @@ <h2 class="no-num no-ref heading settled heading" id=index><span class=content>
11011111< li > onloadingerror, < a href =#dom-fontfaceset-onloadingerror title ="section 3 "> 3</ a >
11021112< li > [PendingReadyPromises], < a href =#dom-fontfaceset-pendingreadypromises title ="section 3 "> 3</ a >
11031113< li > possibly pending font loads, < a href =#possibly-pending-font-loads title ="section 3 "> 3</ a >
1114+ < li > Promise, < a href =#dom-promise title ="section 1.1 "> 1.1</ a >
11041115< li > ready()< ul > < li > method for FontFace, < a href =#dom-fontface-ready title ="section 2.3 "> 2.3</ a >
11051116< li > method for FontFaceSet, < a href =#dom-fontfaceset-ready title ="section 3.5 "> 3.5</ a >
11061117</ ul > < li > source, < a href =#dom-fontfacefontface-source title ="section 2.1 "> 2.1</ a >
0 commit comments