forked from brianleroux/xui
-
Notifications
You must be signed in to change notification settings - Fork 1
Events #1
Copy link
Copy link
Open
Description
Activity
Metadata
Metadata
Assignees
Labels
No labels
How to handle the lack of implementation of window.addEventListener in some browsers ?
Here is what i've done :
else { //very sad way to do this... still looking for better alternative...
switch (type) {
case "keyup" :
el.onkeyup=fn;
case "click" :
el.onclick=fn;
case "touchmove" :
el.touchmove=fn;
}
//need complement...
}
2 solutions :
I would definitely prefer the first one!