- From: Tab Atkins Jr. <jackalmage@gmail.com>
- Date: Thu, 24 May 2012 23:24:18 -0700
- To: Daniel Glazman <daniel.glazman@disruptive-innovations.com>
- Cc: www-style@w3.org
On Thu, May 24, 2012 at 11:14 PM, Daniel Glazman <daniel.glazman@disruptive-innovations.com> wrote: > Le 25/05/12 02:26, Tab Atkins Jr. a écrit : >> Preferably, it would be fired at the @font-face rule in the CSSOM, so >> you don't have to go to any particular effort to figure out which font >> it was. If you do something more general like firing it at document, >> you have to provide all the descriptors so you can distinguish >> separate rules. >> >> Thoughts? > > Yes, load events on fonts are IMHO absolutely needed. Not only for the > reasons you gave but also because some web sites want to know > precisely if the rendering the user gets is the one they designed. An > error event of a font is important information. > > What about the event target? How will you add the event > listener? Doing it on the document is simple. On a font at-rule, that's > considerably harder for web authors because of CSSOM complexity... Boris provided a good reason why firing it at the @font-face rule is unusable in common situations - you won't be able to attach a listener to cross-domain resources. I suppose that means that firing it at the document is necessary, but the difficult then is figuring out which @font-face it was for. I guess the event object would just have to have a property that's a dict of all the descriptors on the rule. ~TJ
Received on Friday, 25 May 2012 06:25:32 UTC