Fixed event listener issue
This commit is contained in:
parent
d75001d5bd
commit
492f7bb2ed
10
kis.js
10
kis.js
@ -73,8 +73,10 @@
|
||||
for(var i in self)
|
||||
{
|
||||
if(typeof self[i] === "object")
|
||||
{
|
||||
self[i].el = sel;
|
||||
}
|
||||
}
|
||||
|
||||
self.el = sel;
|
||||
|
||||
@ -406,14 +408,14 @@
|
||||
{
|
||||
attach = function (sel, event, callback)
|
||||
{
|
||||
if (typeof sel.addEventListener !== "undefined")
|
||||
if (typeof sel.addEventListener != null)
|
||||
{
|
||||
sel.addEventListener(event, callback, false);
|
||||
}
|
||||
};
|
||||
remove = function (sel, event, callback)
|
||||
{
|
||||
if (typeof sel.removeEventListener !== "undefined")
|
||||
if (typeof sel.removeEventListener != null)
|
||||
{
|
||||
sel.removeEventListener(event, callback, false);
|
||||
}
|
||||
@ -505,8 +507,8 @@
|
||||
|
||||
|
||||
(add === true)
|
||||
? attach(e, event, callback)
|
||||
: remove(e, event, callback);
|
||||
? attach(sel, event, callback)
|
||||
: remove(sel, event, callback);
|
||||
};
|
||||
|
||||
e = {
|
||||
|
Loading…
Reference in New Issue
Block a user