Node: Measuring the Window and Document
+ ++
This example shows how to measure the size of the window and document.
+ + + +-
+
- Window size +
- Click me to find out +
- Document size +
- Click me to find out +
Setting up the HTML
+First we need some HTML to work with.
+ + +Getting the Dimensions
+In this example, we will listen for clicks on the DD elements and update them with screen information.
Adding a Click Listener
+Now we just assign the click handler to the DL that will allow us to use event bubbling to handle clicks on each DD.
