Safari Developer Library

Developer

WebKitTransitionEvent Class Reference

Options
Deployment Target:

On This Page

WebKitTransitionEvent

WebKitTransitionEvent objects provide information about CSS transitions specified using the -webkit-transition property. An event is sent at the end of a transition for each CSS property in the transition. Each event contains the name of the CSS property and duration of the transition. You can use these events to perform some action that starts at the end of a transition. More...

Inheritance


  • Event
  • WebKitTransitionEvent

Conforms To


Not Applicable

Import Statement


Not Applicable Not Applicable

Availability


Available in Safari 4.0 and later.
Available in iOS 2.0 and later.
  • propertyName Property

    The name of the CSS property associated with the transition.

    Declaration

    JavaScript

    readonly attribute DOMString propertyName

    Availability

    Available in Safari 4.0 and later.

    Available in iOS 2.0 and later.

  • elapsedTime Property

    The duration of the transition, in seconds, since this event was sent. This value is not affected by the value of the CSS -webkit-transition-delay property.

    Declaration

    JavaScript

    readonly attribute double elapsedTime

    Availability

    Available in Safari 4.0 and later.

    Available in iOS 2.0 and later.

  • Initializes a new transition event object.

    Declaration

    JavaScript

    void initWebKitTransitionEvent (in DOMString typeArg, in boolean canBubbleArg, in boolean cancelableArg, in DOMString propertyNameArg, in double elapsedTimeArg);

    Parameters

    typeArg

    The type of event.

    Possible values for this argument are described in Types of Transition Events. This type of event can bubble and be canceled. Its propertyName property is always set.

    canBubbleArg

    Determines whether the event can bubble. Pass true if it can bubble; otherwise, false.

    cancelableArg

    Determines whether the event’s default action can be prevented. Pass true if it can be prevented; otherwise, false.

    propertyNameArg

    The name of the CSS property associated with this event.

    elapsedTimeArg

    The duration of the transition, in seconds, since the event was sent.

    Discussion

    You use this method to initialize the value of a WebKitTransitionEvent object that is created through the DocumentEvent interface. This method can only be invoked before the WebKitTransitionEvent object is dispatched via the dispatchEvent method (although, it can be invoked multiple times during that phase, if necessary). If it is invoked multiple times, the final invocation takes precedence.

    Availability

    Available in Safari 4.0 and later.

    Available in iOS 2.0 and later.