Wed, 31 Dec 2014 06:55:50 +0100
Added tag UPSTREAM_283F7C6 for changeset ca08bd8f51b2
michael@0 | 1 | <!DOCTYPE HTML> |
michael@0 | 2 | <html> |
michael@0 | 3 | <head> |
michael@0 | 4 | <title>Resize-notifying IFRAME</title> |
michael@0 | 5 | <script type="application/ecmascript"> |
michael@0 | 6 | |
michael@0 | 7 | var gTarget; |
michael@0 | 8 | |
michael@0 | 9 | /* the test is done after the next resize */ |
michael@0 | 10 | function arm() { |
michael@0 | 11 | gTarget = -1; |
michael@0 | 12 | window.addEventListener("resize", got_resize, false); |
michael@0 | 13 | } |
michael@0 | 14 | |
michael@0 | 15 | /* the test is done after the next resize to wider than the current width */ |
michael@0 | 16 | function arm_for_wider() { |
michael@0 | 17 | gTarget = window.innerWidth; |
michael@0 | 18 | window.addEventListener("resize", got_resize, false); |
michael@0 | 19 | } |
michael@0 | 20 | |
michael@0 | 21 | function got_resize() { |
michael@0 | 22 | if (window.innerWidth > gTarget) { |
michael@0 | 23 | // Remove the class="reftest-wait" from the top window |
michael@0 | 24 | window.top.document.documentElement.removeAttribute("class"); |
michael@0 | 25 | } |
michael@0 | 26 | } |
michael@0 | 27 | |
michael@0 | 28 | </script> |
michael@0 | 29 | </head> |
michael@0 | 30 | <body> |
michael@0 | 31 | </body> |
michael@0 | 32 | </html> |