Source code
Revision control
Copy as Markdown
Other Tools
Test Info:
- This WPT test may be referenced by the following Test IDs:
- /css/css-animations/crashtests/base-render-style-body.html - WPT Dashboard Interop Dashboard
<!DOCTYPE html>
<html class="test-wait">
<meta charset="utf-8">
<title>Setting @font-face after establishing baseComputedStyle should not crash</title>
<style>
body { transition: background-color 1s }
.green { background-color: green }
</style>
<style id="sheet"></style>
<script>
window.onload = () => {
document.body.className = "green";
// Needs these frames to establish a baseComputedStyle.
requestAnimationFrame(() => {
requestAnimationFrame(() => {
requestAnimationFrame(() => {
sheet.innerText = "@font-face { font-family: notfound; src: url(notfound.ttf) }";
document.documentElement.classList.remove('test-wait');
});
});
});
};
</script>