Created
January 31, 2019 13:29
-
-
Save subzey/8af4ecc3389d7e682e6394b8970e481c to your computer and use it in GitHub Desktop.
Resize debug
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <title>Screen size debug</title> | |
| </head> | |
| <body> | |
| <script> | |
| function log(s){ | |
| var logEntry = document.createElement('pre'); | |
| logEntry.textContent = (new Date().toISOString() + ' ' + s); | |
| document.body.appendChild(logEntry); | |
| logEntry.scrollIntoView(); | |
| } | |
| log('Page loaded. Size: ' + window.innerWidth + 'x' + window.innerHeight); | |
| window.addEventListener('resize', function(){ | |
| log('Resize event. Window size: ' + window.innerWidth + 'x' + window.innerHeight); | |
| }) | |
| </script> | |
| </body> | |
| </html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment