Source code
Revision control
Copy as Markdown
Other Tools
Test Info:
- This WPT test may be referenced by the following Test IDs:
- /html/semantics/embedded-content/media-elements/crashtests/reinsert-audio-element-onerror-crash.html - WPT Dashboard Interop Dashboard
<!DOCTYPE html>
<html class="test-wait">
<meta name="assert" content="No crash after garbage collection if audio element is reinserted during onerror handler">
<script src="/common/gc.js"></script>
<script>
async function triggerAudioReinsertion() {
document.body.append(audio);
garbageCollect();
scrollY;
requestAnimationFrame(() => {
requestAnimationFrame(() => {
document.documentElement.classList.remove("test-wait");
})
});
}
</script>
<div hidden>
<audio id=audio controls>
<source onerror="triggerAudioReinsertion()">
</audio>
</div>