W3C home > Mailing lists > Public > www-style@w3.org > June 2015

Re: [css-fonts][css-font-loading] Does font loading affect window.load event?

From: John Daggett <jdaggett@mozilla.com>
Date: Mon, 29 Jun 2015 21:41:55 -0700
Message-ID: <CALYZoVOS6n_BRht1G9fXrSqcvT=Ns6UwUZJreMVgb0C7JO5yJA@mail.gmail.com>
To: Koji Ishii <kojiishi@gmail.com>
Cc: "www-style@w3.org" <www-style@w3.org>
Koji Ishii wrote:

> We had a discussion whether window.load event should be delayed until
> all font resources are loaded or not, but I was unable to point to the
> definition.
> Is this defined somewhere, or discussed before?

Not quite sure who "we" is here but I guess I'm assuming Google folks?

Short answer is that this isn't explicitly defined, either in an events
spec or in a CSS spec. The window.load event is supposed to fire when all
dependent resources have been loaded but Webkit progency fire relatively
early, before all fonts are loaded. Firefox fires after all fonts are
loaded. Dunno what IE does.

This is one reason authors should try to use the font loading API to assure
that fonts are loaded, rather than relying on browsers to include fonts
among the resources that must load before the load event fires.
Received on Tuesday, 30 June 2015 04:42:25 UTC

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