News for hackers. Stuff that matters.
Re:Firefox 41 can screenshot a single DOM element by JosephRedfern on Wednesday September 30, 2015 @07:36PM (#10308217)
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?
Re:Firefox 41 can screenshot a single DOM element by potch on Wednesday September 30, 2015 @08:44PM (#10308490)
(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.
Re:Firefox 41 can screenshot a single DOM element by greggman on Thursday October 01, 2015 @04:34AM (#10309933)
So in other words it doesn't work if the element has children that are transformed (tested that). Still useful though
Re:Firefox 41 can screenshot a single DOM element by philh on Thursday October 01, 2015 @07:16AM (#10310370)
And if there are non-child elements positioned to overlap with this one, presumably they get captured too?
Re:Firefox 41 can screenshot a single DOM element by tedmiston on Wednesday September 30, 2015 @09:19PM (#10308639)
What happens if there are elements below the one you're screenshotting by z-index?
Re:Firefox 41 can screenshot a single DOM element by dubcanada on Wednesday September 30, 2015 @09:25PM (#10308662)
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.
Re:Firefox 41 can screenshot a single DOM element by MattBearman on Thursday October 01, 2015 @04:37AM (#10309945)
Are there any plans to make this available through a Javascript API? With appropriate security warnings of course.
Re:Firefox 41 can screenshot a single DOM element by kuschku on Wednesday September 30, 2015 @09:34PM (#10308689)
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