The onresize event
Netscape 4.x had a well-known bug where dynamic content wasn’t redrawn when a Web page was resized. Scripts 9.3 and 9.4 force the page to reload its contents to avoid this problem. Thankfully, Netscape versions 6 and later no longer suffer from this bug.
1. | window.onresize = resizeFix; |
2. | if (document.layers) { |
3. | var origWidth = window.innerWidth; var origHeight = window.innerHeight; |
Get JavaScript and Ajax for the Web: Visual QuickStart Guide, Seventh Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.