Then it draws a filled rectangle within that defined area. Examples Add a click event to the document: document. When passing parameters, use an "anonymous function" to call a function with the parameters: document. There are two main events of interest the keydown and keyup events, the names of which should speak for themselves. Even after all that, it's very easy for it to lose focus, disrupting your event stream.
nest...