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

dom-delegate

Package Overview
Dependencies
Maintainers
3
Versions
24
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

dom-delegate - npm Package Compare versions

Comparing version 2.0.3 to 2.2.0

2

bower.json

@@ -5,4 +5,4 @@ {

"main": "lib/delegate.js",
"ignore": ["test", "GruntFile.js", ".npmignore", ".gitignore", "README.md", "component.json", "package.json"],
"ignore": ["test", "GruntFile.js", ".npmignore", ".gitignore", "README.md", "component.json"],
"license": "MIT"
}

@@ -15,3 +15,5 @@ module.exports = function(grunt) {

options: {
standalone: 'Delegate'
browserifyOptions: {
standalone: 'Delegate'
}
}

@@ -18,0 +20,0 @@ },

@@ -122,3 +122,3 @@ /*jshint browser:true, node:true*/

* @param {function()} handler Handler function - event data passed here will be in event.data
* @param {Object} [eventData] Data to pass in event.data
* @param {boolean} [useCapture] see 'useCapture' in <https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/addEventListener>
* @returns {Delegate} This method is chainable

@@ -125,0 +125,0 @@ */

@@ -8,3 +8,2 @@ /*jshint browser:true, node:true*/

*
* @version 0.3.0
* @codingstandard ftlabs-jsv2

@@ -11,0 +10,0 @@ * @copyright The Financial Times Limited [All Rights Reserved]

{
"description": "Create and manage a DOM event delegator",
"origamiType": "module",
"origamiCategory": "utilities",
"origamiVersion": 1,
"support": "matthew.andrews@ft.com",
"support": "https://github.com/ftlabs/ftdomdelegate/issues",
"supportStatus": "active",

@@ -7,0 +8,0 @@ "ci": {

{
"name": "dom-delegate",
"version": "2.0.3",
"version": "2.2.0",
"author": "FT Labs <enquiries@labs.ft.com> (http://labs.ft.com/)",

@@ -20,3 +20,3 @@ "description": "Create and manage a DOM event delegator.",

"scripts": {
"test": "./node_modules/.bin/grunt && ./node_modules/.bin/buster test"
"test": "./node_modules/.bin/grunt && ./node_modules/.bin/buster-test"
},

@@ -29,11 +29,11 @@ "keywords": [

"devDependencies": {
"buster": "~0.6.2",
"grunt": "~0.4.1",
"grunt-cli": "~0.1.8",
"grunt-buster": "~0.1.2",
"grunt-browserify": "1.0.2",
"grunt-contrib-uglify": "~0.1.2",
"buster": "~0.7.18",
"grunt": "~1.0.1",
"grunt-cli": "~1.2.0",
"grunt-buster": "~0.4.2",
"grunt-browserify": "5.0.0",
"grunt-contrib-uglify": "~2.0.0",
"istanbul": "*",
"buster-istanbul": "*",
"grunt-contrib-jshint": "~0.10.0"
"grunt-contrib-jshint": "~1.0.0"
},

@@ -40,0 +40,0 @@ "license": "MIT",

@@ -23,4 +23,17 @@ # ftdomdelegate [![Build Status](https://travis-ci.org/ftlabs/ftdomdelegate.svg?branch=master)](https://travis-ci.org/ftlabs/ftdomdelegate)

When combined with a good [event listener polyfill](https://github.com/jonathantneal/EventListener) the library can be used in Internet Explorer 8 for events that bubble natively.
For older browsers (IE8) you'll need the following polyfills
- [Event](https://polyfill.io/v2/docs/features/#Event)
- [Array.prototype.map](https://polyfill.io/v2/docs/features/#Array_prototype_map)
- [Function.prototype.bind](https://polyfill.io/v2/docs/features/#Function_prototype_bind)
- [document.querySelector](https://polyfill.io/v2/docs/features/#document_querySelector)
- [Element.prototype.matches](https://polyfill.io/v2/docs/features/#Element_prototype_matches)
The easiest way is to include the following script tag and let [Polyfill.io](https://Polyfill.io) work its magic
```js
<script src="https://cdn.polyfill.io/v2/polyfill.js?features=Event,Array.prototype.map,Function.prototype.bind,document.querySelector,Element.prototype.matches"></script>
```
## Installation ##

@@ -80,3 +93,3 @@

window.addEventListener('load', function() {
document.addEventListener('DOMContentLoaded', function() {
var delegate = new Delegate(document.body);

@@ -89,3 +102,3 @@ delegate.on('click', 'button', handleButtonClicks);

}, false);
});
```

@@ -100,6 +113,6 @@

window.addEventListener('load', function() {
document.addEventListener('DOMContentLoaded', function() {
var delegate = new Delegate(document.body);
delegate.on('error', 'img', handleImageFail);
}, false);
});
```

@@ -146,3 +159,3 @@

The event to listen for e.g. `mousedown`, `mouseup`, `mouseout`, `error` or `click`.
The event to listen for e.g. `mousedown`, `mouseup`, `mouseout`, `error`, `click`, etc.

@@ -149,0 +162,0 @@ #### `selector (string)` ####

Sorry, the diff of this file is not supported yet

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