delegate-it
Advanced tools
Comparing version 6.0.1 to 6.1.0
@@ -46,3 +46,3 @@ /** Keeps track of raw listeners added to the base elements to avoid duplication */ | ||
const capture = Boolean(typeof options === 'object' ? options.capture : options); | ||
const listenerFn = (event) => { | ||
const listenerFunction = (event) => { | ||
const delegateTarget = safeClosest(event, selector); | ||
@@ -53,3 +53,3 @@ if (delegateTarget) { | ||
if (once) { | ||
baseElement.removeEventListener(type, listenerFn, nativeListenerOptions); | ||
baseElement.removeEventListener(type, listenerFunction, nativeListenerOptions); | ||
editLedger(false, baseElement, callback, setup); | ||
@@ -62,3 +62,3 @@ } | ||
if (!isAlreadyListening) { | ||
baseElement.addEventListener(type, listenerFn, nativeListenerOptions); | ||
baseElement.addEventListener(type, listenerFunction, nativeListenerOptions); | ||
} | ||
@@ -65,0 +65,0 @@ signal?.addEventListener('abort', () => { |
@@ -12,7 +12,5 @@ import delegate from './delegate.js'; | ||
}); | ||
delegate(selector, type, | ||
// @ts-expect-error Seems to work fine | ||
resolve, options); | ||
delegate(selector, type, resolve, options); | ||
}); | ||
} | ||
export default oneEvent; |
{ | ||
"name": "delegate-it", | ||
"version": "6.0.1", | ||
"version": "6.1.0", | ||
"description": "Lightweight and modern event delegation in the browser", | ||
@@ -51,12 +51,12 @@ "keywords": [ | ||
"dependencies": { | ||
"typed-query-selector": "^2.10.0" | ||
"typed-query-selector": "^2.11.2" | ||
}, | ||
"devDependencies": { | ||
"@sindresorhus/tsconfig": "^3.0.1", | ||
"@types/jsdom": "^21.1.1", | ||
"jsdom": "^21.1.1", | ||
"typescript": "^5.0.4", | ||
"vitest": "^0.30.1", | ||
"xo": "^0.54.1" | ||
"@sindresorhus/tsconfig": "^5.0.0", | ||
"@types/jsdom": "^21.1.6", | ||
"jsdom": "^24.0.0", | ||
"typescript": "^5.4.2", | ||
"vitest": "^1.3.1", | ||
"xo": "^0.58.0" | ||
} | ||
} |
@@ -15,4 +15,2 @@ # delegate-it [![][badge-gzip]][link-bundlephobia] | ||
If you need IE support, you can keep using [`delegate`](https://github.com/zenorocha/delegate) | ||
## Install | ||
@@ -113,9 +111,2 @@ | ||
## Browser Support | ||
| <img src="https://clipboardjs.com/assets/images/chrome.png" width="48px" height="48px" alt="Chrome logo"> | <img src="https://clipboardjs.com/assets/images/edge.png" width="48px" height="48px" alt="Edge logo"> | <img src="https://clipboardjs.com/assets/images/firefox.png" width="48px" height="48px" alt="Firefox logo"> | <img src="https://clipboardjs.com/assets/images/ie.png" width="48px" height="48px" alt="Internet Explorer logo"> | <img src="https://clipboardjs.com/assets/images/opera.png" width="48px" height="48px" alt="Opera logo"> | <img src="https://clipboardjs.com/assets/images/safari.png" width="48px" height="48px" alt="Safari logo"> | | ||
|:---:|:---:|:---:|:---:|:---:|:---:| | ||
| Latest ✔ | Latest ✔ | Latest ✔ | No ✕ | Latest ✔ | Latest ✔ | | ||
## Related | ||
@@ -122,0 +113,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
10886
113
115
Updatedtyped-query-selector@^2.11.2