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

No flags are currently supported. Pass 0.

Availability
  • Available in Safari 5.1 and later.