Skip to content

Commit d5287da

Browse files
committed
[css-font-loading] Add note about removing SetClass. Fix IDL around promises.
--HG-- extra : rebase_source : 855f21c6be35c810b24d58b5cf069468e81592d6
1 parent e2f6b92 commit d5287da

2 files changed

Lines changed: 316 additions & 256 deletions

File tree

css-font-loading/Overview.bs

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,8 @@ The <code>FontFace</code> Interface</h2>
7474

7575
readonly attribute FontFaceLoadStatus status;
7676

77-
Promise load();
78-
attribute Promise loaded;
77+
Promise&lt;FontFace> load();
78+
attribute Promise&lt;boolean> loaded;
7979
};
8080
</pre>
8181

@@ -297,14 +297,14 @@ The <code>FontFaceSet</code> Interface</h2>
297297

298298
// check and start loads if appropriate
299299
// and fulfill promise when all loads complete
300-
Promise load(DOMString font, optional DOMString text = " ");
300+
Promise&lt;sequence&lt;FontFace>> load(DOMString font, optional DOMString text = " ");
301301

302302
// return whether all fonts in the fontlist are loaded
303303
// (does not initiate load if not available)
304304
boolean check(DOMString font, optional DOMString text = " ");
305305

306306
// async notification that font loading and layout operations are done
307-
Promise ready();
307+
Promise&lt;FontFaceSet> ready();
308308

309309
// loading state, "loading" while one or more fonts loading, "loaded" otherwise
310310
readonly attribute FontFaceLoadStatus status;
@@ -313,6 +313,11 @@ The <code>FontFaceSet</code> Interface</h2>
313313
FontFaceSet implements EventTarget;
314314
</pre>
315315

316+
Note: The use of [SetClass] is controversial,
317+
so this will be rewritten to instead be just a Set look-alike,
318+
without use of [SetClass],
319+
at least until we figure out how to do this kind of thing correctly.
320+
316321
The set entries for a <a interface>FontFaceSet</a> is initially an empty list.
317322
A <a interface>FontFaceSet</a> attached to a document may have some initial <a interface>FontFace</a> objects prefilled in it;
318323
see the section on <a href="#document-font-face-set">Interactions with CSS's @font-face Rule</a> for details.

0 commit comments

Comments
 (0)