W3C home > Mailing lists > Public > www-style@w3.org > July 2012

Re: [css3-fonts][cssom] Load events for webfonts?

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Tue, 24 Jul 2012 15:32:13 -0700
Message-ID: <CAAWBYDD_mioBsP=Xn46tD-s5O0UnFLprUTBjA8FrQ0OHeyJujQ@mail.gmail.com>
To: www-style list <www-style@w3.org>
Modified proposal based on advice on how to spec events properly:

[Constructor(DOMString type, optional FontFaceEventInit eventInitDict)]
interface FontFaceEvent : Event {
  readonly attribute DOMString? family;
  readonly attribute DOMString? src;
  readonly attribute DOMString? style;
  readonly attribute DOMString? weight;
  readonly attribute DOMString? stretch;
  readonly attribute DOMString? unicodeRange;
  readonly attribute DOMString? variant;
  readonly attribute DOMString? featureSettings;
};

dictionary FontFaceEventInit : EventInit {
  DOMString family;
  DOMString src;
  DOMString style;
  DOMString weight;
  DOMString stretch;
  DOMString unicodeRange;
  DOMString variant;
  DOMString featureSettings;
}

# Attributes #

For each attribute, if the corresponding descriptor is present in the
associated @font-face rule, the attribute's value is the cssText of that
descriptor.  Otherwise, the attribute's value is the value null.

# Behavior #

When a @font-face rule successfully finishes loading its src and is
ready to be used, fire a FontFaceEvent of type "load" at the document
object.
Bubbles: No.
Cancelable: No.

~TJ
Received on Tuesday, 24 July 2012 22:33:01 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:20:57 GMT