animation-event

1.1.0 • Public • Published

animation-event Build Status

value-event handlers for CSS animation events

Install

$ npm install --save animation-event

Usage

var animationEvent = require('animation-event')
var h = require('virtual-dom/h')
 
h('div', {
  'ev-animationend': animationEvent.end(animationEndHandler)
})

API

animationEvent.start(handler, [data]) -> function

animationEvent.iteration(handler, [data]) -> function

animationEvent.end(handler, [data]) -> function

handler

Required
Type: function

The handler to call when the element receives the specified animation event.

data

Type: object
Default: {}

Data to pass to the handler. This will be extended with:

name

Type: string

The animation name read from the event's animationName.

time

Type: number

The animation duration in seconds, read from the event's elapsedTime.

License

MIT © Ben Drucker

Package Sidebar

Install

npm i animation-event

Weekly Downloads

1

Version

1.1.0

License

MIT

Last publish

Collaborators

  • bendrucker