W3C home > Mailing lists > Public > www-style@w3.org > December 2014

[css-font-loading] FontFaceSet.ready value and uniqueness

From: Bear Travis <betravis@adobe.com>
Date: Thu, 11 Dec 2014 21:52:37 +0000
To: "www-style@w3.org" <www-style@w3.org>
Message-ID: <3DBE4564-6F7A-44B2-9E9D-76B66AD77FB3@adobe.com>
Hi All,

I have some (hopefully) simple questions about the ready attribute on FontFaceSet.
1. First, does the attribute change value after it has been fulfilled, but then new fonts are added and begin loading? Basically, is there a promise fulfillment for each loadingdone event. For example:
document.fonts.ready.then(function() {
     // add new font face declarations and style content to use them
     document.fonts.ready.then(function() {
          console.log("all fonts loaded");

2. Is there a requirement that the ready attribute be the same across all calls made before it fulfills? Eg:
Must document.fonts.ready === document.fonts.ready;
Or could the ready attribute return a separate promise on every read, provided that each is fulfilled at the appropriate time?


Received on Thursday, 11 December 2014 21:53:06 UTC

This archive was generated by hypermail 2.4.0 : Friday, 25 March 2022 10:08:49 UTC