HTML and CSS Reference
In-Depth Information
Table 3-14. ( continued )
Attribute
Runs the Script ...
onresize 13
When the browser window is resized
onstorage
When loading
onunload
When the user leaves the web page
The onreadystatechange Event Handler
The only event handler supported exclusively by the Document objects is onreadystatechange , which is triggered
every time the readyState changes which holds the status of the server response to our request.
Clipboard Event Handlers
The clipboard event handlers supported by HTML5 [43] are summarized in Table 3-15 .
Table 3-15. Clipboard Event Handlers in HTML5
Attribute
Runs the Script...
oncopy
When the user copies the content of an element
oncut
When the user cuts the content of an element
onpaste
When the user pastes some content in an element
onbeforecopy
When initiating a copy operation
onbeforecut
When initiating a cut operation
onbeforepaste
When initiating a paste operation
Touch Event Handlers
In HTML5 web applications, you can handle touch events from a mobile device or computer touchscreen by using
touch event handlers on the HTML5 canvas to capture the user's movements and allow them to draw on the canvas.
Table 3-16 summarizes the touch event handlers supported by HTML5 [44].
Table 3-16. Touch Event Handlers
Attribute
Runs the Script When...
ontouchcancel
A touch point has been disrupted
ontouchend
The user removes a touch point from the touch surface, or the touch point physically left the
touch surface
ontouchmove
The user moves a touch point along the touch surface
ontouchstart
The user places a touch point on the touch surface
13 Unlike all the other window event handlers, onresize is a global event handler which is supported by all HTML5 elements as
well as all Document and Window objects.
 
 
Search WWH ::




Custom Search