Exciting news!Announcing our $4.6M Series Seed. Learn more
Socket
LoveBlogFAQ
Install
Log in

proper-on-transition-end

Package Overview
Dependencies
1
Maintainers
2
Versions
8
Issues
File Explorer

Advanced tools

proper-on-transition-end

Cross-browser transitionend event listener

    0.3.1latest

Version published
Maintainers
2
Yearly downloads
3,158
increased by8%

Weekly downloads

Readme

Source

proper-on-transition-end

NPM version Downloads Build Status Coverage Status Dependency status Dev Dependency status Greenkeeper badge

Cross-browser transitionend event listener.

This module is based on on-transition-end, which no longer seems to be maintained and is not working properly. Also, it automatically infers the timeout based on the transition duration.

Installation

$ npm install proper-on-transition-end

Usage

import onTransitionEnd from 'proper-on-transition-end'; // or const onTransitionEnd = window.onTransitionEnd; const cancelOnTransitionEnd = onTransitionEnd(element, [options,] callback)
  • element: The element that is transitioning.
  • options: You can pass a few options here:
    • timeout: This is automatically calculated for you, based on the longest transition of the element, using longest-transition. Still, you can override that and pass the timeout in milliseconds.
    • gracePeriod: There is an implicit grace period of 100 milliseconds before the event times out, but you can tweak it using this option.
  • callback: The callback that is called when the transition ends.

Calling cancelOnTransitionEnd will remove the listener and cleanup the timers.

Tests

$ npm test
$ npm test-cov to get coverage report

License

Released under the MIT License.

Keywords

FAQs

What is proper-on-transition-end?

Cross-browser transitionend event listener

Is proper-on-transition-end popular?

The npm package proper-on-transition-end receives a total of 142 weekly downloads. As such, proper-on-transition-end popularity was classified as not popular.

Is proper-on-transition-end well maintained?

We found that proper-on-transition-end demonstrated a not healthy version release cadence and project activity. It has 2 open source maintainers collaborating on the project.

Last updated on 25 Jun 2019
Socket

Product

Subscribe to our newsletter

Get open source security insights delivered straight into your inbox. Be the first to learn about new features and product updates.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc