Expose a mozbrowser.loadScript API




5 years ago
2 months ago


(Reporter: vingtetun, Unassigned)


Firefox Tracking Flags

(Not tracked)



(1 attachment)

Created attachment 782155 [details] [diff] [review]

Such an API would be the first step to support greasemonkey / page-mod like in FFOS. 

the attached wip simply expose a loadScript method on mozbrowser iframe. The loadScript method takes a JS string that will be evaluate in a sandbox.

I assume it would be much more efficient to pass a file url and have the file descriptor being pass between processes.

Also the current wip has some limitations such as exposing API to web pages in a secure way. Or even ensure the script can listen for page load without having to pass it everytime on a mozbrowserlocationchange.

One things to figure out is a mechanism to match url to load scripts. I would like to see it living in the system app instead of keeping a list of rules in each child process. Just thinking loud since this is obviously not in this dirty little wip.

Move all DOM bugs that haven’t been updated in more than 3 years and has no one currently assigned to P5.

If you have questions, please contact :mdaly.
Priority: -- → P5
You need to log in before you can comment on or make changes to this bug.