webscreens / screen-enumeration

Screen enumeration API explainer
Apache License 2.0
23 stars 4 forks source link

Use cases for screen enumeration in service workers? #16

Closed markafoltz closed 4 years ago

markafoltz commented 4 years ago

The explainer proposes exposing the screen enumeration API to service workers.

But I'm not sure what a service worker would do with this information; by design, they don't render content directly to the user. The SW could trigger a notification that links to a page with content, but then it's that page that needs screen enumeration, not the SW.

Can you think of some use cases for screen enumeration in service workers?

michaelwasserman commented 4 years ago

Service workers could make use of this information when paired with proposed Window Placement capabilities, if clients.openWindow is extended with optional parameters for target coordinates/screens. I'll add some more details in the explainer.

michaelwasserman commented 4 years ago

The current proposal doesn't expose any information to service workers; that notion has generally moved into the additional explorations document, which explores alternatives and potential extensions of the current proposal.