Skip to content

Events #1

@cluster

Description

@cluster

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 :

  • find a better way (one function which works on all browsers)
  • fill the list above with events supported by all borwsers...

I would definitely prefer the first one!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions