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.

Tasks

Displaying Full-screen

Matching Selectors

Properties

onwebkitfullscreenchange

An event listener that is called when the element enters or exits full-screen mode.

attribute EventListener onwebkitfullscreenchange
Availability

Methods

webkitMatchesSelector

Compares selectors to see whether they match.

boolean webkitMatchesSelector (in DOMString selectors);
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.

void webkitRequestFullScreen (in unsigned short flags);
Parameters
flags

Determines characteristics of the full-screen window. Currently, only one flag, ALLOW_KEYBOARD_INPUT, is supported. If you pass ALLOW_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_INPUT

Indicates the full-screen window responds to keyboard events.

Available in Safari 5.1 and later.


Did this document help you? Yes It's good, but... Not helpful...