Skip to content

Commit

Permalink
Bumped version to 2.1.6
Browse files Browse the repository at this point in the history
  • Loading branch information
fabiospampinato committed May 18, 2018
1 parent 8ad05a5 commit aae23fa
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 9 deletions.
5 changes: 4 additions & 1 deletion dist/cash.js
Original file line number Diff line number Diff line change
Expand Up @@ -645,6 +645,7 @@ fn.on = function (eventFullName, selector, callback, _one) {
_this2.each(function (i, ele) {
var finalCallback = function finalCallback(event) {
if (event.namespace && !hasNamespaces(namespaces, event.namespace.split(eventsNamespacesSeparator))) return;
var thisArg = ele;

if (selector) {
var target = event.target;
Expand All @@ -654,10 +655,12 @@ fn.on = function (eventFullName, selector, callback, _one) {
target = target.parentNode;
if (!target) return;
}

thisArg = target;
}

event.namespace = event.namespace || '';
callback.call(ele, event, event.data);
callback.call(thisArg, event, event.data);

if (_one) {
removeEvent(ele, name, namespaces, finalCallback);
Expand Down
14 changes: 7 additions & 7 deletions dist/cash.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "cash-dom",
"description": "An absurdly small jQuery alternative for modern browsers.",
"version": "2.1.5",
"version": "2.1.6",
"license": "MIT",
"main": "./dist/cash.js",
"scripts": {
Expand Down

0 comments on commit aae23fa

Please sign in to comment.