For quite some time I think that it is possible to add custom method to native Event object. How do you think? I have not found a way. I would be grateful for any opinions and recommendations.
Best regards.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
It’s generally considered bad practice to extend the native objects of Javascript. But if you would, you add a method to the objects prototype.
Example:
html:
js:
Here you can find a list of events: https://developer.mozilla.org/en/DOM/event