initAnimationEvent method

Initializes the values of an animation event.

Internet Explorer 10

 

Syntax

var retval = AnimationEvent.initAnimationEvent(typeArg, canBubbleArg, cancelableArg, animationNameArg, elapsedTimeArg);

Parameters

typeArg [in]

Type: DOMString

A string that specifies the event type

ValueMeaning
animationStart

Occurs at the start of an animation.

animationEnd

Occurs when the animation is finished.

animationIteration

Occurs at the end of an animation, when animation-iteration-count is greater than 1.

 

canBubbleArg [in]

Type: boolean

Specifies whether an event bubbles.

ValueMeaning
true

The event bubbles.

false

The event does not bubble.

 

cancelableArg [in]

Type: boolean

Specifies whether an event can be canceled.

ValueMeaning
true

The event can be canceled.

false

The event cannot be canceled.

 

animationNameArg [in]

Type: DOMString

A string identifying the name of the animation.

elapsedTimeArg [in]

Type: Floating-point

A number indicating the amount of time the animation has been running, in seconds.

Return value

Type: HRESULT

This method can return one of these values.

S_OK

Remarks

Call initAnimationEvent method before dispatching the event; otherwise, it has no effect.

Use document.createEvent to create an event and dispatchEvent to dispatch it to the target object.

See also

AnimationEvent

 

 

Show:
© 2014 Microsoft