loadFrameScript ignores external iframe

Talk about add-ons and extension development.
Locked
pintassilgo
Posts: 200
Joined: August 30th, 2013, 3:50 pm

loadFrameScript ignores external iframe

Post by pintassilgo »

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?
Locked