Socket
Socket
Sign inDemoInstall

proper-on-transition-end

Package Overview
Dependencies
0
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    proper-on-transition-end

Cross-browser transitionend event listener


Version published
Weekly downloads
102
decreased by-26.62%
Maintainers
1
Created
Weekly downloads
 

Readme

Source

proper-on-transition-end

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

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.

import onTransitionEnd from 'proper-on-transition-end';
// or
const onTransitionEnd = window.onTransitionEnd;

const element = document.getElementById('transitioning-element');

onTransitionEnd(element, 1000, () => console.log('done'));

Installation

$ npm install proper-on-transition-end

Usage

onTransitionEnd(element, duration, callback)
  • element: The element that is transitioning.
  • duration: The expected duration of the transition, in milliseconds. Note that there is an implicit grace period of 100 milliseconds before the event times out. If you'd like to tweak this, instead of providing a Number, you can provide an object as follows { duration: 1000, gracePeriod: 200 }.
  • callback: The callback that is called when the transition ends.

Tests

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

License

Released under the MIT License.

Keywords

FAQs

Last updated on 29 Nov 2016

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc