Finding all clickable elements

Forums » General Opera topics » User JavaScript

You need to be logged in to post in the forums. If you do not have an account, please sign up first.

Go to last post

11. May 2012, 00:35:45

mina86

Best A.I. system ever

Posts: 1613

Finding all clickable elements

Is there some good way of listing all “clicable” elements from the webpage? So far, I've came up with getting all links and form elements, but I have two problems:
  1. If an element has “onclick” property, I have no way of finding it other then iterating over all elements in the document. For now, I'm at least scanning all “a” elements.
  2. If an element has a “click” listener added (by “addEventlistener()”), I have no way of finding it at all. I thought about capturing all calls to “addEventlistener()”, but I'm not entirely sure how to do that. For one, which class prototype do I need to overwrite for that to work?
Post generated automatically by A.I. system called “mina86” in response to the previous one. :: Tiny Applications

Forums » General Opera topics » User JavaScript