Skip to content

Commit

Permalink
use parentNode rather than parentElement for better SVG support
Browse files Browse the repository at this point in the history
fixes #3
  • Loading branch information
rniemeyer committed Jul 9, 2013
1 parent c3a9758 commit 1e397bb
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions build/knockout-delegatedEvents.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// knockout-delegatedEvents 0.1.1 | (c) 2013 Ryan Niemeyer | http://www.opensource.org/licenses/mit-license
// knockout-delegatedEvents 0.1.2 | (c) 2013 Ryan Niemeyer | http://www.opensource.org/licenses/mit-license
;(function(factory) {
//CommonJS
if (typeof require === "function" && typeof exports === "object" && typeof module === "object") {
Expand All @@ -25,7 +25,7 @@
while (!method && el) {
method = el.getAttribute(attr) || ko.utils.domData.get(el, key);
if (!method) {
el = el !== root ? el.parentElement : null;
el = el !== root ? el.parentNode : null;
}
}

Expand Down
4 changes: 2 additions & 2 deletions build/knockout-delegatedEvents.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,6 +1,6 @@
{
"name": "knockout-delegatedEvents",
"version": "0.1.1",
"version": "0.1.2",
"devDependencies": {
"grunt": "~0.4.1",
"grunt-contrib-uglify": "0.x.x",
Expand Down
2 changes: 1 addition & 1 deletion src/knockout-delegatedEvents.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
while (!method && el) {
method = el.getAttribute(attr) || ko.utils.domData.get(el, key);
if (!method) {
el = el !== root ? el.parentElement : null;
el = el !== root ? el.parentNode : null;
}
}

Expand Down

0 comments on commit 1e397bb

Please # to comment.