Skip to main content
initTransitionEvent method

Used to initialize the value of a TransitionEvent.

Important  As of Microsoft Edge, the createEvent()/ initEvent() constructor pattern for synthetic events is deprecated. See the Synthetic Events page for more information.
Internet Explorer 10



var retval = transitionEvent.initTransitionEvent(typeArg, canBubbleArg, cancelableArg, propertyNameArg, elapsedTimeArg);


typeArg [in]

Type: DOMString

Specifies the event type.

canBubbleArg [in]

Type: boolean

Specifies whether or not the event can bubble.

cancelableArg [in]

Type: boolean

Specifies whether or not the event's default action can be prevented. Since a TransitionEvent is purely for notification, there is no default action.

propertyNameArg [in]

Type: DOMString

Specifies the name of the property associated with the Event.

elapsedTimeArg [in]

Type: Floating-point

Specifies the amount of time, in seconds, the transition has been running at the time of initialization.

Return value


This method can return one of these values.



This method is used to initialize the value of a TransitionEvent. This method may only be called before the TransitionEvent has been dispatched via the dispatchEvent method, though it may be called multiple times during that phase if necessary. If called multiple times, the final invocation takes precedence.

See also