Call Firefox helper functions from JS

Further to my previous topic about screenshots.

Probably a silly question, but is it possible to call Firefox Web Console helper functions from JavaScript at my website? Say, I have some button and it calls for a screenshot function:

function downloadScreenshot()
{
    if(navigator.userAgent.toLowerCase().indexOf('firefox') === -1)
    { alert("Firefox-only"); return; }
    
    eval(":screenshot --selector '#some-div' --dpr 1");
}

If I try to run this I naturally get SyntaxError: expected expression, got ':'.

Firefox Developer Edition 63.0b10 (64-bit).

Hello!

No, this code is not exposed to websites. You quite probably don’t want websites to take screenshots of your screen :slight_smile:

1 Like

But the screenshot is saved on the client side, “website” is not getting it.
On second thought, they could abuse this function and spam my hard drive with screenshots taken every millisecond, so I agree that such functionality should not be exposed.