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.
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,
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,