Source code
Revision control
Copy as Markdown
Other Tools
Test Info:
- This WPT test may be referenced by the following Test IDs:
- /css/css-page/crashtests/match-media-listener-shrink-content-print.html - WPT Dashboard Interop Dashboard
<!DOCTYPE html>
<link rel="author" title="Morten Stenshorne" href="mailto:mstensho@chromium.org">
<style>
@page {
size: 500px;
margin: 0;
}
</style>
<div id="shrinkme" style="height:5000px;"></div>
<script>
var mediaQuery = window.matchMedia("print");
mediaQuery.addListener(function() {
shrinkme.style.height = "2000px";
});
</script>