I'm adding some new functionality to a Firefox plugin that is recording actions user does in the browser. The problem is, the click handler is a little bit broken - it doesn't add anything to identify a button if it has "image" type. I want to make it add a relieable piece of data to help identify the exact button user has clicked. To my knownledge, putting its XPath location is the only way to do so. So I'm looking for a way to get such value, hopefully without the need to iterate all over up to the root element.
Upd: I can't change t开发者_C百科he source code of the site
I think I know what you want now, and I guess you can see how xpather does it, but I am afraid it will do it by going through the tree to the root...
精彩评论