[MediaStream] 'devicechange' event should not fire in frames that can't access captur...
[WebKit-https.git] / LayoutTests / http / tests / media / media-stream / resources / device-change-iframe.html
1 <script>
2     let myID;
3     navigator.mediaDevices.ondevicechange = (event) => {
4         parent.postMessage(myID, '*');
5         result.innerHTML = `${myID} got 'devicechange' event`;
6     };
7     window.addEventListener("message", (event) => { myID = event.data; });
8 </script>
9
10 <div id='result'></div>
11
12