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

> It seems like it would only make sense if we could translate the viewport segment coordinates into the iframe's coordinate space. The use cases would essentially be so that an iframe which straddled a viewport boundary could observe that boundary and lay its content out around it.
> 

Right but we're going to increase the implementation complexity by a lot. Viewport Segments are basically updated when the posture changes or when the viewport configuration changes (resize, orientation change etc) that's it. Now we would have to recompute the iframe relative segments for anything that happens to the iframe itself like position change, geometry changes, etc. Is it worth it? Not sure, I'd like developers to come up with use cases. I'm planning a Chrome Origin Trial for these APIs so it's a good moment to ask the needs.

> I would be concerned however if this ends up exposing more information about the position of an iframe in its parent document than is currently available.

Can an iframe figure out its position relative to the embedder, in viewport coordinates? If so, we're not adding much, segments given to the page are basically a logical division of the main frame viewport. 



-- 
GitHub Notification of comment by darktears
Please view or discuss this issue at https://github.com/w3c/device-posture/issues/111#issuecomment-1984139638 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 18:06:23 UTC