Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/awcross/pfx-animation
Browser prefix helper for animation event
https://github.com/awcross/pfx-animation
Last synced: about 1 month ago
JSON representation
Browser prefix helper for animation event
- Host: GitHub
- URL: https://github.com/awcross/pfx-animation
- Owner: awcross
- License: mit
- Created: 2017-01-13T01:29:20.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2017-01-13T21:58:42.000Z (almost 8 years ago)
- Last Synced: 2024-10-10T06:46:59.189Z (about 1 month ago)
- Language: JavaScript
- Size: 3.91 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- License: license
Awesome Lists containing this project
README
# pfx-animation [![Build Status](https://travis-ci.org/awcross/pfx-animation.svg?branch=master)](https://travis-ci.org/awcross/pfx-animation)
> Browser prefix helper for animation event
## Install
```
$ npm install --save pfx-animation
```## Usage
```js
const animation = require('pfx-animation');const obj = document.querySelector('.move-obj');
obj.addEventListener(animation.end, () => {
// the animation has finished
}, false);
```## API
### animation
Object containing three properties, `start`, `iteration`, and `end`, that map to [animationstart](https://developer.mozilla.org/en-US/docs/Web/Events/animationstart), [animationiteration](https://developer.mozilla.org/en-US/docs/Web/Events/animationiteration), and [animationend](https://developer.mozilla.org/en-US/docs/Web/Events/animationend), respectively, and include the correct vendor animation prefix (if needed).
## License
MIT © [Alex Cross](https://alexcross.io)