fastbinder
Advanced tools
Comparing version 0.3.8 to 0.3.9
@@ -100,8 +100,16 @@ /** | ||
var controller = getController(target); | ||
var controllerHandlerFn = strToFunction(controller + '.' + handler); | ||
var handlerFn = strToFunction(handler); | ||
var controllerHandlerFn = strToFunction(controller + '.' + handler); | ||
var beforeFn = $.fastbinder.options.beforeEventHandlerFn; | ||
if (typeof controllerHandlerFn === 'function') { | ||
if (typeof beforeFn === 'function') { | ||
beforeFn({ controller: controller, handler: handler, targetElement: target[0] }); | ||
} | ||
return controllerHandlerFn.call(target[0], e); | ||
} | ||
if (typeof handlerFn === 'function') { | ||
if (typeof beforeFn === 'function') { | ||
beforeFn({ handler: handler, targetElement: target[0] }); | ||
} | ||
return handlerFn.call(target[0], e); | ||
@@ -225,3 +233,4 @@ } | ||
scrollDelay: 50, | ||
forceExternalLinks: true | ||
forceExternalLinks: true, | ||
beforeEventHandlerFn: null | ||
}; | ||
@@ -228,0 +237,0 @@ |
{ | ||
"name": "fastbinder", | ||
"description": "Fast and worry-free dynamic event binding", | ||
"version": "0.3.8", | ||
"version": "0.3.9", | ||
"repository": "https://github.com/andrewchilds/fastbinder.git", | ||
@@ -6,0 +6,0 @@ "author": { |
876426
18409