Can plain Javascript objects have event attached to them? Say something like this:
obj = new Object();
obj.addEventListener('doSomething', foo, true);
I know i can do this with jQuery, but is it possible without any library?
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.
You’ll have to implement your own functionality for that, but that’s not very hard.