[device-posture] Should Device Posture API be exposed to iframes (JS or CSS) (#111)

darktears has just created a new issue for https://github.com/w3c/device-posture:

== Should Device Posture API be exposed to iframes (JS or CSS) ==
One question I have is the value of exposing the posture to iframes. I'll be happy to hear use cases where it could be useful.

In Chromium right now, Device Posture CSS MQs and JS API are exposed to iframes. Viewport Segments are exposed to iframe through CSS MQs (and working), but the JS APIs (visual viewport `segments `property) is defined but returns null.

In most cases the embedder will react to the posture/viewport segments changes and move the iframe around (for example to avoid the iframe being in the fold).

I'm not sure the iframe itself needs all the information. For example, in Chromium, the viewport segments are not recalculated relatively to the iframe coordinate space, so the values make little sense.  The only use case I can think of is if the iframe is basically the size of the viewport and then all of the data make sense.

Thoughts?



Please view or discuss this issue at https://github.com/w3c/device-posture/issues/111 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Thursday, 7 March 2024 15:49:13 UTC