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.
The spec currently says that setting the attribute to an invalid value will do nothing. This isn't actually the case because these are nullable attributes and they throw when set according the current WebIDL spec (at least as far as I could work out) and also in practice throw in at least Chromium
The spec currently says that setting the attribute to an invalid value will do nothing. This isn't actually the case because these are nullable attributes and they throw when set according the current WebIDL spec (at least as far as I could work out) and also in practice throw in at least Chromium