WICG / local-font-access

Web API for enumerating fonts on the local system
https://wicg.github.io/local-font-access
Apache License 2.0
77 stars 16 forks source link

Should this really use "environment settings object" to store things? #34

Closed domenic closed 2 years ago

domenic commented 4 years ago

Note that every global has an environment settings object, including worklets and service workers. However the relevant API is only exposed on Window and Worker contexts.

Probably instead the spec should use WindowOrWorkerGlobalScope?

jakearchibald commented 3 years ago

Since this has the [SameObject] declaration, the getter steps could create the object, right?

domenic commented 3 years ago

Sadly [SameObject] in IDL doesn't currently generate spec text to cache what you return, so you'd need to do the caching somewhere yourself. Which brings us back to the original issue.

jakearchibald commented 3 years ago

Hah then what is [SameObject] even for? Is it just an assert? Then yeah, I agree, this should be on WindowOrWorkerGlobalScope, or could it be put directly on NavigatorFonts?

domenic commented 3 years ago

Yeah it's currently an assert.

NavigatorFonts would work too, I suppose. It's a bit weird to put things on mixins, but after all, that's what WindowOrWorkerGlobalScope is, and we put plenty of things there...

inexorabletash commented 3 years ago

Do y'all have a spec in mind that correctly defines navigator.thingy to use as a model?

Otherwise, I'll go digging.

inexorabletash commented 2 years ago

In 43b11434db3265fede8863514a20227068f5af93 the spec was updated to remove Worker support, and NavigatorFonts included by Navigator is where it lives now. I think this particular issue is resolved, although #33 remains. So closing this out.