Comparing version 0.3.0 to 0.3.1
@@ -13,3 +13,3 @@ { | ||
"typescript": "1.8.7", | ||
"dompteuse": "0.3.0", | ||
"dompteuse": "0.3.1", | ||
"snabbdom": "0.4.2", | ||
@@ -16,0 +16,0 @@ "most": "0.19.6", |
@@ -63,3 +63,3 @@ 'use strict'; | ||
var listener = function listener(evt) { | ||
if (targetMatches(evt.target, sub.selector, el)) sub.streamAdd(evt); | ||
if (targetMatches(evt.target, sel, el)) add(evt); | ||
}; | ||
@@ -66,0 +66,0 @@ |
{ | ||
"name": "dompteuse", | ||
"version": "0.3.0", | ||
"version": "0.3.1", | ||
"main": "lib/dompteuse", | ||
@@ -5,0 +5,0 @@ "typings": "lib/dompteuse.d.ts", |
@@ -301,1 +301,15 @@ # dompteuse | ||
``` | ||
## Events | ||
Builds a Stream of DOM Events using Event delegation. | ||
```javascript | ||
listenAt(node: Element, targetSelector: string, eventName: string): Stream<Event> | ||
``` | ||
```javascript | ||
import { Events } from 'dompteuse' | ||
const stream = Events.listenAt(document.body, '.button', 'click') | ||
``` |
@@ -53,4 +53,3 @@ import most from 'most'; | ||
const listener = evt => { | ||
if (targetMatches(evt.target, sub.selector, el)) | ||
sub.streamAdd(evt); | ||
if (targetMatches(evt.target, sel, el)) add(evt); | ||
} | ||
@@ -57,0 +56,0 @@ |
Sorry, the diff of this file is too big to display
1357612
315
14346