Socket
Socket
Sign inDemoInstall

@bleckert/delegate-event

Package Overview
Dependencies
0
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.0.0 to 1.0.1

7

dist/module.js
function $cf838c15c8b009ba$export$2e2bcd8739ae039(event, selector, fn, context = document) {
function handler(e) {
const el = e.target.closest(selector);
if (el) fn(e, el);
if (el) {
const result = fn(e, el);
if (result === false) e.preventDefault();
}
}
context.addEventListener(event, (e)=>handler);
context.addEventListener(event, (e)=>handler(e));
return ()=>context.removeEventListener(event, handler);

@@ -8,0 +11,0 @@ }

{
"name": "@bleckert/delegate-event",
"repository": "https://github.com/tbleckert/delegate-event",
"version": "1.0.0",
"version": "1.0.1",
"description": "Simple DOM event delegation",

@@ -6,0 +6,0 @@ "source": "src/index.js",

@@ -16,3 +16,3 @@ <h1 align="center">

<a href="https://bundlephobia.com/result?p=@bleckert/delegate-event">
<img src="https://img.shields.io/bundlephobia/minzip/@bleckert/events?style=for-the-badge" />
<img src="https://img.shields.io/bundlephobia/minzip/@bleckert/delegate-event?style=for-the-badge" />
</a>

@@ -19,0 +19,0 @@ <a href="https://github.com/sponsors/tbleckert">

Sorry, the diff of this file is not supported yet

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