WICG/ua-client-hints

Provide a list of all supported client hints

jridgewell opened this issue · 2 comments

Similar to PerformanceObserver.supportedEntryTypes, I'm looking for a programatic way to collect a list of all supported client hints that could be requested from getHighEntropyValues.

In Terser, we reserve a list of known keys when mangling so that most users won't have to do any special configuration in order to work with the DOM APIs. Without a list of known client hints (which are used as keys in the return object from getHighEntropyValues, we're stuck maintaining a hardcoded list of current hints. This list is guaranteed to go out of date with new additions, so I'd like to get this maintained as part of the official DOM API.

@jridgewell to clarify, you're interested in a way to know all possible hints, or just the hints supported by a given browser? Looking at terser, it seems like this doesn't run in the client, so possibly the former is what you're after.

Those supported by the current browser. We use a helper page to extract a list of DOM properties automatically.