0

Suppose we have a html tag and some javascript function is attached on that by addEvenetListner or attachEvent (with tag id or name but not inline), and if we need find out that which function is attach on that tag, then what is good way for find that.

Please suggest me.

2 Answers 2

1

If don't need to do it programmatically you can use visual event. If you need to do it programmatically i only have a jquery solution ($('#element').data('events');)

Sign up to request clarification or add additional context in comments.

Comments

0

There is no native API to get event handler that was attached by addEventListener/attachEvent. jQuery store internal this handlers in some object. If you use jQuery you can done this by:

$('#someID').data('events');

Or you can write wrapper for addEventListener/attachEvent and store handlers manualy.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.