Safari Developer Library

Developer

Element Additions Reference

Options
Deployment Target:

On This Page

Element

These Safari additions to the Element class are mainly used to support full-screen mode. There’s also a method for comparing selectors.

Inheritance


  • Node
  • Element
  • HTMLElement
  • SVGElement

Conforms To


Not Applicable

Import Statement


Not Applicable Not Applicable

Availability


Available in Safari 3.0 and later.
  • An event listener that is called when the element enters or exits full-screen mode.

    Declaration

    JavaScript

    attribute EventListener onwebkitfullscreenchange

    Availability

    Available in Safari 5.1 and later.

  • Changes the element to full-screen mode.

    Declaration

    JavaScript

    void webkitRequestFullScreen (in unsigned short flags);

    Parameters

    flags

    No flags are currently supported. Pass 0.

    Availability

    Available in Safari 5.1 and later.

  • Compares selectors to see whether they match.

    Declaration

    JavaScript

    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.