javascript - Detecting element on which the user has clicked from mozilla firefox extension -
I'm developing a Mozilla Firefox extension. I have a sample web page in which I have embedded an iframe with a web page. Users can click anywhere, but whenever they click on the IFrame part, I want to alert the user. All the processing can only be done from my extension. Plus help ..
iframe addEventListener ('click', function (e) {if ( e.target) {var win = e.target.ownerDocument.defaultView; win.alert ('You clicked on + e.target;)}}}
Comments
Post a Comment