firegestures icon indicating copy to clipboard operation
firegestures copied to clipboard

window.content is null (E10S)

Open Ceremony64 opened this issue 8 years ago • 2 comments

window.content is no longer available with E10S/multithreading enabled. This breaks a lot of custom scripts unfortunately.

Ceremony64 avatar Jul 25 '16 18:07 Ceremony64

I found a work-around for retrieving the selected text with e10s enabled, which should fix many custom search/translate/modify-scripts:

var mySelection = FireGestures._selectedText

(Assignment can be found in firegestures/chrome/content/firegestures/browser.js line 81, in line 80 there's also a sourceNode-handler which might provide solutions for other problems, it might be a good idea to consider isRemote() to determine state of e10s)

Robert-Fl avatar Dec 23 '16 20:12 Robert-Fl

I add the same problem using the "Open in Internet Explorer" script.

I think a good way to improve this would be to modify how script are called. For now script are executed without any context:

https://github.com/gomita/firegestures/blob/master/chrome/content/firegestures/browser.js#L135

It would be nice to be able to access both the "event" and the "this" object when running a script. This would allow to use the plugin code inside custom scripts.

gwenzek avatar Feb 20 '17 16:02 gwenzek