WICG / web-preferences-api

The Web Preference API aims to provide a way for sites to override the value for a given user preference (e.g. color-scheme preference) in a way that fully integrates with existing Web APIs.
https://wicg.github.io/web-preferences-api/
Other
41 stars 2 forks source link

Should `getSupported` be asynchronous? #12

Closed lukewarlow closed 9 months ago

lukewarlow commented 10 months ago

I originally made all the methods asynchronous and that wasn't necessarily for any particular reason.

Now that this is using attributes the only Promise left is on getSupported but given this is mostly static data (aside from perhaps dynamically changing based on feature flags).

I can't think of a reason why this actually needs to be asynchronous?

So I've changed it to be synchronous. If a valid reason can be given for it to be asynchronous I'm happy to change it back,