1.1.0 • Published 8 years ago

animation-event v1.1.0

Weekly downloads
3
License
MIT
Repository
github
Last release
8 years ago

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