I need to handle clicks and get the clicked element.
Can't use addEventListener in parent process because e10s, so a click anywhere in the page has element <browser> instead of actual clicked element.
The solution I know is to run addEventListener from Services.mm.loadFrameScript because I want to handle clicks in any tab.
But there's a problem: if the page has external iframes like an embedded youtube video, clicks on iframe aren't catched and I can't handle the actual clicked element within iframe window.
Using Firefox native code as in legacy extensions, how to add a event listener that also work on external iframes?
loadFrameScript ignores external iframe
-
- Posts: 200
- Joined: August 30th, 2013, 3:50 pm