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.1 to 2.0.2

6

lib/delegate.js

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

Delegate.prototype.captureForType = function(eventType) {
return ['error', 'blur', 'focus', 'scroll', 'resize'].indexOf(eventType) !== -1;
return ['blur', 'error', 'focus', 'load', 'resize', 'scroll'].indexOf(eventType) !== -1;
};

@@ -327,3 +327,3 @@

// TODO:MCG:20120117: Need a way
// to check if event#stopImmediateProgagation
// to check if event#stopImmediatePropagation
// was called. If so, break both loops.

@@ -345,3 +345,3 @@ if (listener.matcher.call(target, listener.matcherParam, target)) {

// TODO:MCG:20120117: Need a way to
// check if event#stopProgagation
// check if event#stopPropagation
// was called. If so, break looping

@@ -348,0 +348,0 @@ // through the DOM. Stop if the

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

@@ -5,0 +5,0 @@ "description": "Create and manage a DOM event delegator.",

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

Delegate is developed by [FT Labs](http://labs.ft.com/), part of the Financial Times.
FT DOM Delegate is developed by [FT Labs](http://labs.ft.com/), part of the Financial Times.

@@ -28,2 +28,4 @@ ## Compatibility ##

Get the [browserify](http://browserify.org/)-able source from a package manager:
```

@@ -41,6 +43,27 @@ npm install dom-delegate

Download the [built version](http://wzrd.in/standalone/dom-delegate@latest).
Download the [built version](http://wzrd.in/standalone/dom-delegate@latest). (Note: this exposes the API via `window.domDelegate.Delegate`)
## Usage ##
The library is written in CommonJS and so can either be `require` in or the prebuilt wzrd.in version can be used, which makes the API available via `window.domDelegate.Delegate`.
```js
var delegate, Delegate, myDel;
// If using the wzrd.in pre-built javascript, either:-
Delegate = domDelegate.Delegate
myDel = new Delegate(document.body);
// Or:-
myDel = domDelegate(document.body);
// If requiring the module via CommonJS, either:-
Delegate = require('dom-delegate').Delegate;
myDel = new Delegate(document.body);
// Or:-
delegate = require('dom-delegate');
myDel = delegate(document.body);
```
The script must be loaded prior to instantiating a Delegate object.

@@ -124,3 +147,3 @@

#### `selector (string|function)` ####
#### `selector (string)` ####

@@ -131,3 +154,3 @@ Any kind of valid CSS selector supported by [`matchesSelector`](http://caniuse.com/matchesselector). Some selectors, like `#id` or `tag` will use optimized functions internally that check for straight matches between the ID or tag name of elements.

#### `handler (function|boolean)` ####
#### `handler (function)` ####

@@ -148,3 +171,3 @@ Function that will handle the specified event on elements matching the given selector. The function will receive two arguments: the native event object and the target element, in that order.

#### `selector (string|function)` ####
#### `selector (string)` ####

@@ -155,3 +178,3 @@ Only remove listeners registered with the given selector, among the other arguments.

#### `handler (function|boolean)` ####
#### `handler (function)` ####

@@ -158,0 +181,0 @@ Only remove listeners registered with the given handler function, among the other arguments. If not provided, remove all handlers.

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