Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cross-origin or isolated content #33

Open
martinthomson opened this issue Sep 14, 2023 · 1 comment
Open

cross-origin or isolated content #33

martinthomson opened this issue Sep 14, 2023 · 1 comment

Comments

@martinthomson
Copy link

Can this be used for content that would not otherwise be readable to the origin? The spec doesn't seem to prevent that.

Given that an element might be occluded or off-screen, that makes this very challenging ...even if access to this capability is gated behind consent prompts. That also makes this very different from asking for fullscreen/browser/tab capture.

I would prefer that this not be possible for elements that contain cross-origin content. Or, that the mechanism used for canvas (tainting) be used to cause content to be inaccessible if content is not readable by the origin.

@eladalon1983
Copy link
Contributor

This API is exposed on MediaStreamTrack. This means that an origin invoking this API already has access to all of the pixels in the current tab, so all that content is already readable.

One might have objected that occlusions contradict the prior claim, as the pixels Element Capture gives access to are different from those of the whole tab, and are not a strict subset. I believe that such an objection would be incorrect. The origin that mints the RestrictionTarget token and posts it to the capturer, effectively declares itself to be willing to collaborate with the capturer. It could have just removed occlusions and given the capturer access to them, if it so wished.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants