Comparing version 2.0.2 to 2.0.3
{ | ||
"name": "delegate", | ||
"version": "2.0.2", | ||
"version": "2.0.3", | ||
"description": "Lightweight event delegation", | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
@@ -89,9 +89,5 @@ (function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.delegate = f()}})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){ | ||
return function(e) { | ||
var delegateTarget = closest(e.target, selector, true); | ||
e.delegateTarget = closest(e.target, selector, true); | ||
if (delegateTarget) { | ||
Object.defineProperty(e, 'target', { | ||
value: delegateTarget | ||
}); | ||
if (e.delegateTarget) { | ||
callback.call(element, e); | ||
@@ -98,0 +94,0 @@ } |
{ | ||
"name": "delegate", | ||
"description": "Lightweight event delegation", | ||
"version": "2.0.2", | ||
"version": "2.0.3", | ||
"repository": "zenorocha/delegate", | ||
@@ -6,0 +6,0 @@ "main": "src/delegate.js", |
@@ -55,4 +55,10 @@ # delegate | ||
## Browser Support | ||
| <img src="https://raw.githubusercontent.com/alrra/browser-logos/master/chrome/chrome_64x64.png" width="48px" height="48px" alt="Chrome logo"> | <img src="https://raw.githubusercontent.com/alrra/browser-logos/master/firefox/firefox_64x64.png" width="48px" height="48px" alt="Firefox logo"> | <img src="https://raw.githubusercontent.com/alrra/browser-logos/master/internet-explorer/internet-explorer_64x64.png" width="48px" height="48px" alt="Internet Explorer logo"> | <img src="https://raw.githubusercontent.com/alrra/browser-logos/master/opera/opera_64x64.png" width="48px" height="48px" alt="Opera logo"> | <img src="https://raw.githubusercontent.com/alrra/browser-logos/master/safari/safari_64x64.png" width="48px" height="48px" alt="Safari logo"> | | ||
|:---:|:---:|:---:|:---:|:---:| | ||
| Latest ✔ | Latest ✔ | IE 9+ ✔ | Latest ✔ | Latest ✔ | | ||
## License | ||
[MIT License](http://zenorocha.mit-license.org/) © Zeno Rocha |
@@ -35,9 +35,5 @@ var closest = require('closest'); | ||
return function(e) { | ||
var delegateTarget = closest(e.target, selector, true); | ||
e.delegateTarget = closest(e.target, selector, true); | ||
if (delegateTarget) { | ||
Object.defineProperty(e, 'target', { | ||
value: delegateTarget | ||
}); | ||
if (e.delegateTarget) { | ||
callback.call(element, e); | ||
@@ -44,0 +40,0 @@ } |
@@ -7,7 +7,7 @@ var delegate = require('../src/delegate'); | ||
var html = '<ul>' + | ||
'<li><a href="#">Item 1</a></li>' + | ||
'<li><a href="#">Item 2</a></li>' + | ||
'<li><a href="#">Item 3</a></li>' + | ||
'<li><a href="#">Item 4</a></li>' + | ||
'<li><a href="#">Item 5</a></li>' + | ||
'<li><a>Item 1</a></li>' + | ||
'<li><a>Item 2</a></li>' + | ||
'<li><a>Item 3</a></li>' + | ||
'<li><a>Item 4</a></li>' + | ||
'<li><a>Item 5</a></li>' + | ||
'</ul>'; | ||
@@ -14,0 +14,0 @@ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
11034
64
184