ladybird/Tests/LibWeb/Text/input/link-element-media-attribute.html

22 lines
582 B
HTML
Raw Normal View History

2025-03-18 19:28:35 +01:00
<!DOCTYPE html>
<style>
body {
background: green;
}
</style>
<script src="include.js"></script>
<script>
asyncTest(done => {
let link = document.createElement("link");
link.setAttribute("rel", "stylesheet");
link.setAttribute("href", "body-background-color-red.css");
link.setAttribute("media", "print");
document.head.appendChild(link);
window.onload = function () {
println("document background: " + getComputedStyle(document.body).backgroundColor);
done();
};
});
</script>