mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-31 14:15:30 +00:00
85611a7b6d
--HG-- extra : rebase_source : a22344ee1569f58f1f0a01017bfe0d46a6a14602
33 lines
682 B
HTML
33 lines
682 B
HTML
<!DOCTYPE HTML>
|
|
<html>
|
|
<head>
|
|
<title>Resize-notifying IFRAME</title>
|
|
<script type="application/ecmascript">
|
|
|
|
var gTarget;
|
|
|
|
/*
|
|
* the test is done after the width becomes narrower (immediately)
|
|
* and then comes back to the same size. However, the two things
|
|
* might happen at once.
|
|
*/
|
|
function arm() {
|
|
gTarget = window.innerWidth;
|
|
window.addEventListener("resize", got_resize);
|
|
setTimeout(got_resize, 200);
|
|
}
|
|
|
|
function got_resize() {
|
|
if (window.innerWidth == gTarget) {
|
|
gTarget = -1;
|
|
// Remove the class="reftest-wait" from the top window
|
|
window.top.document.documentElement.removeAttribute("class");
|
|
}
|
|
}
|
|
|
|
</script>
|
|
</head>
|
|
<body>
|
|
</body>
|
|
</html>
|