Source code
Revision control
Copy as Markdown
Other Tools
Test Info:
- This WPT test may be referenced by the following Test IDs:
- /css/css-backgrounds/animations/background-color-animation-backdrop-infinite-duration-crash.html - WPT Dashboard Interop Dashboard
<!DOCTYPE html>
<html>
<style>
#target {
background: blue;
border: 2px solid black;
height: 100px;
width: 100px;
}
</style>
<body>
<dialog id="target"></dialog>
</body>
<script>
window.onload = async () => {
const target = document.getElementById('target');
target.showModal();
const anim =
target.animate({ backgroundColor: ['green', 'blue'] }, {
duration: Infinity,
pseudoElement: '::backdrop'
});
await anim.ready;
await waitForAnimationFrames(3);
};
</script>
</html>