How does this work with elements with a semi-transparent background? Will the resulting screenshots also be semi-transparent, or will they contain portions of the element beneath?
(I work for Mozilla) It captures the page cropped to the bounding box of the element, so any background content would also be captured. The results would not contain transparency.
You would see the element under it assuming it's possible. What this does is finds the bounding box cords and takes a full page screenshot and crops it to that region.
If you want to render an element with transparency, you have to seperate it from the page and render it yourself with ctx.drawWindow(window, x, y, dx, dy, "transparent") to a canvas