Comparing version 0.13.4 to 0.13.5
@@ -6,8 +6,8 @@ 'use strict'; | ||
function dispatch({target, listener}) { | ||
function dispatch(event, listener) { | ||
if (typeof listener === 'function') | ||
listener.call(target, this); | ||
listener.call(event.target, event); | ||
else | ||
listener.handleEvent(this); | ||
return this._stopImmediatePropagationFlag; | ||
listener.handleEvent(event); | ||
return event._stopImmediatePropagationFlag; | ||
} | ||
@@ -30,3 +30,3 @@ | ||
listeners.delete(listener); | ||
if (dispatch.call(this, {target: this, listener})) | ||
if (dispatch(this, listener)) | ||
break; | ||
@@ -33,0 +33,0 @@ } |
@@ -5,8 +5,8 @@ // https://dom.spec.whatwg.org/#interface-eventtarget | ||
function dispatch({target, listener}) { | ||
function dispatch(event, listener) { | ||
if (typeof listener === 'function') | ||
listener.call(target, this); | ||
listener.call(event.target, event); | ||
else | ||
listener.handleEvent(this); | ||
return this._stopImmediatePropagationFlag; | ||
listener.handleEvent(event); | ||
return event._stopImmediatePropagationFlag; | ||
} | ||
@@ -29,3 +29,3 @@ | ||
listeners.delete(listener); | ||
if (dispatch.call(this, {target: this, listener})) | ||
if (dispatch(this, listener)) | ||
break; | ||
@@ -32,0 +32,0 @@ } |
{ | ||
"name": "linkedom", | ||
"version": "0.13.4", | ||
"version": "0.13.5", | ||
"description": "A triple-linked lists based DOM implementation", | ||
@@ -5,0 +5,0 @@ "main": "./cjs/index.js", |
Sorry, the diff of this file is too big to display
1025580