In this question there is an example how to request XPCOM access from Javascript:
How to create a file using javascript in Mozilla Firefox
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
I was hoping to find a way to enable XPCOM access in similar manner for my Selenium test scripts, so that Javascript could directly write RAW image data to a file. This actually continues my previous questions how to extract pixel data from in optimized manner:
Firefox, Selenium, toDataURL, Uint8ClampedArray and Python
What I am hoping to achieve
Enable XPCOM access for Javascripts run through Selenium
Render image on Canvas
Read canvas pixels as raw image data (public API should be available on the canvas itself)
Write RAW image data to a file using XPCOM interfaces in a known path location
Note: PNG etc. encoding is unaccetable. This must be raw data for the speed, as it will be directly feed to a video encoding,