HTML and CSS Reference
In-Depth Information
Listing I.22. Following the mouse with setCapture()
That's all you need to know about capturing mouse events on an element, but there's an
alternative approach you might want to consider. Instead of attempting to capture mouse
movement as it moves outside the element, you could make the element take up the full
screen. You'll learn about the Full-Screen API in the next section.
I.3.3. The Full-Screen API: expanding any element to full screen
The Full-Screen API allows any element to expand to take up the entire screen. The ele-
ment will be the only thing displayed; no browser chrome will be visible. FigureI.13 shows
Wilson in full-screen mode in Firefox12. The text “Press ESC at any time to exit full-
screen” will fade out after a few seconds; it's added as a security measure so that it's ob-
vious to users that they've entered full-screen mode. Otherwise, a nefarious script could
simulate their entire desktop in order to steal passwords and other personal information.
Search WWH ::

Custom Search