Source code

Revision control

Copy as Markdown

Other Tools

Test Info:

<head>
<title>getComputedStyle does not crash with @page rules</title>
<meta charset="utf-8" />
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<style type="text/css">
@page {
margin: 0;
}
</style>
</head>
<body>
<p id="target">Test</p>
<script>
"use strict";
test(() => {
const styles = window.getComputedStyle(document.getElementById("target"));
styles.color;
}, "getComputedStyle should not throw when a @page rule is present");
</script>
</body>
</html>