summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/mediacapture-streams/support/iframe-MediaStreamTrack-transfer.html
blob: e8d6aac647de880283dca1cd6993f05787acf289 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
<!DOCTYPE html>
<html>
  <head>
    <title>iframe</title>
    <script>
      function onMsg(e) {
        if(e.data instanceof MediaStreamTrack) {
          parent.postMessage({result: 'Success'});
        } else {
          parent.postMessage({
            result: 'Failure',
            error: `${e.data} is not a MediaStreamTrack`
          });
        }
      }
      window.addEventListener("message", onMsg);
    </script>
  </head>
  <body>
  </body>
</html>