Safari Developer Library

Developer

Document Additions Reference

Options
Deployment Target:

On This Page

Document

These additions to the Document class are used to create touch event objects on iOS and control full-screen mode on the desktop.

  • Creates a new Touch object.

    Declaration

    TouchcreateTouch( in DOMWindowview, in EventTargettarget, in longidentifier, in longpageX, in longpageY, in longscreenX, in longscreenY) raises ( DOMException);

    Parameters

    view

    The view (DOM window) in which the event occurred.

    target

    The target of this gesture.

    identifier

    The unique identifier for this touch object.

    pageX

    The x-coordinate of the touch’s location, in page coordinates.

    pageY

    The y-coordinate of the touch’s location, in page coordinates.

    screenX

    The x-coordinate of the event’s location, in screen coordinates.

    screenY

    The y-coordinate of the event’s location, in screen coordinates.

  • Creates a new TouchList object.

    Declaration

    TouchListcreateTouchList(in TouchfirstTouch, …) raises ( DOMException);

    Parameters

    firstTouch, …

    The touch object.

    Discussion

    This method accepts a varying number of Touch parameters.

  • Cancels full-screen mode.

    Declaration

    voidwebkitCancelFullScreen ();

  • The element that is fullscreen.

    Declaration

    readonly attribute Element webkitCurrentFullScreenElement

  • A Boolean that indicates whether keyboard input is allowed in fullscreen mode.

    Declaration

    readonly attribute boolean webkitFullScreenKeyboardInputAllowed

    Discussion

    true if keyboard input is allowed; otherwise, false.

  • A Boolean that indicates whether the document is in full-screen mode.

    Declaration

    readonly attribute boolean webkitIsFullScreen

    Discussion

    true if the document is in full-screen mode; otherwise, false.

  • An event listener that is called when entering or exiting full-screen mode.

    Declaration

    attribute EventListener onwebkitfullscreenchange