Re: [css-font-loading] feedback

On Mon, May 26, 2014 at 6:51 AM, Anne van Kesteren <annevk@annevk.nl> wrote:
> Context: http://dev.w3.org/csswg/css-font-loading/
>
> ready() doesn't seem different from .loaded in how it's used. So we
> should make it a property with a getter.

Yeah, discussion with Domenic revealed this to me already.  I plan to
make this change.

> Should FontFaceSource be on the CSS global instead? CSS.fonts rather
> than document.fonts in a document environment and self.fonts in a
> worker environment.

Maybe?  It's not strictly a CSS thing, but I dunno what's most
appropriate here.  I don't think there's really a "correct" place, so
it's more a matter of what patterns we generally want to develop in
the placement of things like this.

> In the FontFace constructor you set status to "loading" at some point,
> but it's not clear from which task or microtask this is done. How can
> this be observed?

I'm not sure what you mean by this.  The algorithm from step 2 onward
is done asynchronously.  Do I need further detail?  If so, what?  (And
also, is there written guidance on how to do it, if I'm doing it
wrong?)

> You say "reject with a NetworkError" but you don't define
> NetworkError. Maybe you mean a DOMException whose name is
> "NetworkError"? Same for exception/error names mentioned elsewhere.

Yes, that is what I mean.  Is there written guidance on how to
properly invoke errors in a spec document?

> You need to use the [Exposed] attribute to make sure your interfaces
> are actually available in workers. See e.g. URL or Encoding for
> examples.

Ah cool, thanks.

~TJ

Received on Monday, 26 May 2014 23:59:16 UTC