How to add an alias for 'addEventListener' method?

Viewed 709

It's common in many libraries to use on rather than addEventListener. Personally I find it quite annoying to type addEventListener every time.

Is there a way to add an alias?

Thanks.

4 Answers
Related