gecko-dev/layout/reftests/font-face/resize-detector-iframe.html
Florian Quèze 85611a7b6d Bug 1331081 - script generated patch to omit addEventListener/removeEventListener's third parameter when it's false, r=jaws.
--HG--
extra : rebase_source : a22344ee1569f58f1f0a01017bfe0d46a6a14602
2017-01-17 11:50:25 +01:00

33 lines
684 B
HTML

<!DOCTYPE HTML>
<html>
<head>
<title>Resize-notifying IFRAME</title>
<script type="application/ecmascript">
var gTarget;
/* the test is done after the next resize */
function arm() {
gTarget = -1;
window.addEventListener("resize", got_resize);
}
/* the test is done after the next resize to wider than the current width */
function arm_for_wider() {
gTarget = window.innerWidth;
window.addEventListener("resize", got_resize);
}
function got_resize() {
if (window.innerWidth > gTarget) {
// Remove the class="reftest-wait" from the top window
window.top.document.documentElement.removeAttribute("class");
}
}
</script>
</head>
<body>
</body>
</html>