Created
March 30, 2018 18:41
-
-
Save bgrins/434972c28bedfcc4eed85d9c6a05f308 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var el = window.document.createElementNS("http://www.w3.org/1999/xhtml", "canvas"); | |
el.width = window.innerWidth; | |
el.height = window.innerHeight; | |
var ctx = el.getContext("2d"); | |
SpecialPowers.wrap(ctx).drawWindow(window, 0, 0, window.innerWidth, window.innerHeight, "rgba(0,0,0,0)", | |
ctx.DRAWWINDOW_USE_WIDGET_LAYERS | ctx.DRAWWINDOW_DRAW_VIEW | ctx.DRAWWINDOW_DRAW_CARET); | |
dump("\n" + el.toDataURL() + "\n"); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment