![]() ![]() ::: browser/components/shell/HeadlessShell.jsm:97 Reader.onloadend = () => resolve(reader) Return new Promise(resolve => canvas.toBlob(resolve) We're in an async function so it would be nicer to make a few small functions that wrap the toBlob and reader in ways that return promises that you can just await on. BUGZILLA SCREENSHOT PATCHPatch to add support for saving screen shot as jpeg file: 12157: Xfce4-screenshooter: General: RESOLVED: FIXED: Rename when by while: 2015-11. Please go to for our new server Xfce4-screenshooter. ![]() catch((reason) => dump("Failure saving screenshot: " reason "\n")) Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. then(() => dump("Screenshot saved to: " path "\n")) > async function takeScreenshot(fullpage, contentWidth, contentHeight, path, url) ) > webProgress.addProgressListener(progressListener, ::: browser/components/shell/HeadlessShell.jsm:49 We don't need to do this now, but we should expose a flag for if headless is supported (I'll file a bug). We'll also need to wrap it an if and only show on linux/windows. Let's add documentation for the new flags up here. > " -private-window Open in a new private window.\n" > " -new-window Open in a new window.\n" ::: browser/components/nsBrowserContentHandler.js:454 ![]() BUGZILLA SCREENSHOT FREEFeel free to grab me if any of it's unclear! I also have a few slight feature changes after talking with Myk, but I'll leave that comment in the bug. Just a few little things below (mainly making takeScreenshot more like synchronous js). then once the page is loaded (after first paint or some amount delay?) use drawWindow to save the png įor finding spots where we could listen to the page loading I would follow firefox's handling of the URL command line argument and attach a listener somewhere along the way to the window.Ĭomment on attachment 88871010 - screenshot from command line with headless check for the arg somewhere in nsAppRunner.cpp and set a flag (maybe in HeadlessWidget?) that we can later retrieve It'd be nice to easily take a screen shot of a web page from the command line using headless Firefox similar to what Chrome supports.įor example: `firefox -headless -screenshot ` would produce screenshot.pngĪ rough outline of what needs to be done: ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |