summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/permissions-policy/permissions-policy-frame-policy-timing-iframe-camera.https.sub.html
blob: 995ac2134e75013b7c8a4b8ddf20ebff48749229 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
<!DOCTYPE html>
<meta charset="utf-8">
<script>
window.onmessage = m => {
  navigator.mediaDevices.getUserMedia({video: true})
    .then(() => 'ok')
    .catch(e => e.name)
    .then(r => {
      window.parent.postMessage({
        id: m.data.id,
        result: r
      }, '*');
    });
}
</script>