1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
content / test / data / media / session / change_document.html [blame]
<html>
<body>
<audio src='foo'></audio>
<audio id='moved' src='audio-6seconds.ogg'></audio>
<iframe></iframe>
</body>
<script>
const audio = document.getElementById('moved');
function moveAudioToSubframe() {
const frame_document = window.frames[0].document;
frame_document.body.appendChild(frame_document.adoptNode(audio));
}
async function play() {
await audio.play();
return true;
}
</script>
</html>