paramax-framework
Advanced tools
Comparing version 1.0.9 to 1.0.10
@@ -49,13 +49,2 @@ function setAttributes(el, attrs) { | ||
function addEventListener(eventName, handler, el, hostComponent = null) { | ||
function boundHandler(event) { | ||
event.preventDefault(); | ||
event.stopPropagation(); | ||
hostComponent | ||
? handler.apply(hostComponent, arguments) | ||
: handler(...arguments); | ||
} | ||
el.addEventListener(eventName, boundHandler); | ||
return boundHandler; | ||
} | ||
function addEventListeners(listeners = {}, el, hostComponent = null) { | ||
@@ -74,2 +63,13 @@ const addedListeners = {}; | ||
} | ||
function addEventListener(eventName, handler, el, hostComponent = null) { | ||
function boundHandler(event) { | ||
event.preventDefault(); | ||
event.stopPropagation(); | ||
hostComponent | ||
? handler.apply(hostComponent, arguments) | ||
: handler(...arguments); | ||
} | ||
el.addEventListener(eventName, boundHandler); | ||
return boundHandler; | ||
} | ||
@@ -76,0 +76,0 @@ function withoutNulls(arr) { |
{ | ||
"name": "paramax-framework", | ||
"version": "1.0.9", | ||
"version": "1.0.10", | ||
"description": "A lightweight framework", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
35214