Firefox's :screenshot helper function is perfect for my needs (I need the --dpr parameter in particular), so I'd like to put it in a loop (e.g. take a screenshot, wait 1 second, take another, etc), to avoid having to manually refocus the Web Console, re-enter the command, return to the webpage, etc.
However, I'm unable to integrate it into a Javascript loop in the Web Console:
for (let i = 0; i < 2; i++) {
:screenshot --fullpage --dpr 2
}
This results in a syntax error (expected, since :screenshot is not Javascript):
Uncaught SyntaxError: expected expression, got ':'
How can I call :screenshot in a loop?