Page tree
Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Next »

Debugging with JavaScript

Explains the console - http://buildinternet.com/2010/12/debugging-javascript-behind-the-scenes/

Useful JavaScript Tricks

Resolution

In the browser address bar,

To determine the actual size of the browser window, use the following properties:

Internet Explorer (backward-compatibility mode):
document.body.offsetWidth, document.body.offsetHeight

Internet Explorer (standards mode, document.compatMode=='CSS1Compat'):
document.documentElement.offsetWidth, document.documentElement.offsetHeight

Most other browsers:
window.innerWidth, window.innerHeight

  • No labels