Call Firefox Helper Functions From Js
Firefox Web Console offers a screenshot helper function: :screenshot --selector '#element-id' --dpr 1 Probably a silly question, but is it possible to call this function from Java
Solution 1:
You can't. Those helper functions are executed in a totally different context then a web page, with totally different privileges. Here the source code: https://searchfox.org/mozilla-central/source/devtools/shared/screenshot/save.js
So from a web page, you don't have access to them.
The only way to have a similar functionality, is create your own add-on that take the screenshot. Then, from your website, you can check if the add-on is installed, and send to it the command to take the screenshot.
Post a Comment for "Call Firefox Helper Functions From Js"