Closed beaufortfrancois closed 4 years ago
Thanks for pointing that out! There are certainly trade-offs for each, here are some top of mind:
window.screen
and may be simpler for web devs (without permission gating?).Are there good patterns for permission gating with a synchronous access model?
It seems like most guidance has been toward an async API for screen information, mainly to support privacy protections. The updated explainer says something like "By returning a promise, user agents can asynchronously determine what amount of information to expose, prompt users to decide, calculate the resulting values lazily, and reject or resolve accordingly." The additional explorations doc considers synchronous access here. Feel free to reopen this issue or file a new issue if the topic should be explored further.
As raised by TAG review at https://github.com/w3ctag/design-reviews/issues/439#issuecomment-561902607, we may want to reconsider having an async API or not for enumerating screens.