Element Additions Reference
| Inherits from | Node |
| Companion guide | |
| Availability | Available in Safari 3.0 and later. |
Overview
These Safari additions to the Element class are mainly used to support full-screen mode. There’s also a method for comparing selectors.
Properties
onwebkitfullscreenchange
An event listener that is called when the element enters or exits full-screen mode.
attribute EventListener onwebkitfullscreenchange
Availability
- Available in Safari 5.1 and later.
Methods
webkitMatchesSelector
Compares selectors to see whether they match.
Parameters
- selectors
The selectors to compare.
Return Value
true if the selectors match. false if they don’t match.
Availability
- Available in Safari 5.0 and later.
webkitRequestFullScreen
Changes the element to full-screen mode.
Parameters
- flags
Determines characteristics of the full-screen window. Currently, only one flag,
ALLOW_KEYBOARD_INPUT, is supported. If you passALLOW_KEYBOARD_INPUT, the full-screen window responds to keyboard commands; otherwise, it does not.
Availability
- Available in Safari 5.1 and later.
Constants
Flags for Full-screen Windows
Flags used to specify the behavior of a full-screen window.
const unsigned short ALLOW_KEYBOARD_INPUT = 1;
Constants
ALLOW_KEYBOARD_INPUTIndicates the full-screen window responds to keyboard events.
Available in Safari 5.1 and later.
© 2011 Apple Inc. All Rights Reserved. (Last updated: 2011-06-14)