gomita / firegestures

FireGestures, a Firefox extension.
http://www.xuldev.org/firegestures/
Other
127 stars 30 forks source link

window.content is null (E10S) #137

Open Ceremony64 opened 8 years ago

Ceremony64 commented 8 years ago

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

Robert-Fl commented 7 years ago

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)

gwenzek commented 7 years ago

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.