Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

domestique

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

domestique - npm Package Compare versions

Comparing version 1.2.0 to 1.3.0

src/event/on-transition-end.js

2

index.js

@@ -17,2 +17,3 @@ import inViewport from './src/dimension/in-viewport';

import on from './src/event/on';
import onTransitionEnd from './src/event/on-transition-end';
import ready from './src/event/ready';

@@ -45,2 +46,3 @@

on,
onTransitionEnd,
off,

@@ -47,0 +49,0 @@ ready,

2

package.json
{
"name": "domestique",
"version": "1.2.0",
"version": "1.3.0",
"description": "A modular DOM helper library.",

@@ -5,0 +5,0 @@ "repository": "https://github.com/jsor/domestique.git",

@@ -60,2 +60,3 @@ Domestique

on,
onTransitionEnd,
off,

@@ -92,2 +93,3 @@ delegate,

* [on()](#on)
* [onTransitionEnd()](#ontransitionend)
* [off()](#off)

@@ -378,2 +380,30 @@ * [delegate()](#delegate)

#### onTransitionEnd()
```
onTransitionEnd(target: EventTarget, listener: EventListener): function
```
Registers a one-time `listener` for the `transitionend` event on `target`.
The function returns another function which can be used to unregister the event listener.
##### Example
```javascript
const target = document.querySelector('.my-element');
const listener = function (target) {
target.classList.add('transition-ended');
console.log('Transition ended');
};
const remove = onTransitionEnd(
target,
listener
);
remove(); // Remove event listener
```
#### off()

@@ -413,3 +443,5 @@

```javascript
const listener = function () {
const listener = function (e, target) {
target.classList.add('my-target-clicked');
console.log('My Button clicked');

@@ -416,0 +448,0 @@ };

@@ -28,3 +28,3 @@ import closest from '../query/closest';

listener.call(delegateTarget, event);
listener.call(delegateTarget, event, delegateTarget);
}, options);

@@ -31,0 +31,0 @@

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc