1
0
Fork 0
firefox/testing/web-platform/tests/permissions-policy/permissions-policy-frame-policy-timing-iframe-camera.https.sub.html
Daniel Baumann 5e9a113729
Adding upstream version 140.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
2025-06-25 09:37:52 +02:00

14 lines
394 B
HTML

<!DOCTYPE html>
<meta charset="utf-8">
<script>
var id = (new URLSearchParams(window.location.search)).get('id');
window.onmessage = m => {
navigator.mediaDevices.getUserMedia({video: true})
.then(() => 'ok')
.catch(e => e.name)
.then(r => {
window.parent.postMessage({id: id, result: r}, '*');
});
}
window.parent.postMessage({id: id, result: 'ready'}, '*');
</script>