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

On Wed, Aug 22, 2012 at 3:40 AM, Glenn Adams <glenn@skynav.com> wrote:
> On Wed, Aug 22, 2012 at 12:43 PM, John Daggett <jdaggett@mozilla.com> wrote:
>> Tab Atkins wrote:
>> > 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;
>> > };
>
>
> If we are going to be using CSSStyleDeclaration to represent the descriptors
> of @font-face, then why not do so in the event as well rather than
> redefining such a bushy interface. That is, change the above to:
>
> interface FontFaceEvent : Event {
>   readonly attribute CSSStyleDeclaration descriptors;
> }
>
> and define descriptors to be non-mutable (like that returned by
> getComputedStyle).

I'd prefer not to - the extra indirection through .descriptors seems
unnecessary.  I wouldn't be *opposed* if an implementor thought it was
easier, but it makes the event slightly harder to work with for
authors.

~TJ

Received on Wednesday, 22 August 2012 15:43:32 UTC