bcc: chromium-dev as an FYI
Primary eng (and PM) emails
ksak...@chromium.org, kenji...@chromium.org
Summary
In M40, we will show deprecation warnings on calls to document.fonts.ready() (returning a promise) as the spec has been updated in favor of having ready as an attribute (promise). Tentatively, we’ll make the switch in M41.
Motivation
For consistency with the pattern of having ready as an attribute (promise). This pattern started to get traction after we shipped our implementation of CSS font loading.
Compatibility Risk
Theoretically there is a risk that we break websites relying on ready being a function. However, in practice the use counter for this particular feature of the CSS font loading API indicates that it's still rarely used (if ever).
https://www.chromestatus.com/metrics/feature/timeline/popularity/464
Firefox is currently implementing CSS font loading and therefore it’s highly likely that their implementation will have ready as an attribute: https://bugzilla.mozilla.org/show_bug.cgi?id=1028497
Alternative implementation suggestion for web developers
Since the name didn't change, we can't have a deprecation period where both versions co-exist.
One solution would be to use the following approach:
var fontsReady = document.fonts.ready;
if (typeof(fontsReady) == "function")
fontsReady = document.fonts.ready();
fontsReady.then(...);
Usage information from UseCounter
https://www.chromestatus.com/metrics/feature/timeline/popularity/464
Entry on chromestatus.com, crbug.com, or MDN
Deprecation: https://code.google.com/p/chromium/issues/detail?id=425447
Impl: https://code.google.com/p/chromium/issues/detail?id=392077
Requesting approval to remove too?
No, this is a behavior change which seems better to postpone to the next milestone (i.e. M41) despite the low usage.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.
For a lot of deprecations we've had no real developer relations efforts to try and get this news out to as many developers as possible. We can certainly sort this out.
Also we have no clear way of understanding the exact sites that are impacted by a deprecation so that we can pro actively contact affected sites (even via webmaster central).