Hacker News new | ask | show | jobs
by potch 3910 days ago
(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.
3 comments

So in other words it doesn't work if the element has children that are transformed (tested that). Still useful though
And if there are non-child elements positioned to overlap with this one, presumably they get captured too?
What happens if there are elements below the one you're screenshotting by z-index?
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.
Are there any plans to make this available through a Javascript API? With appropriate security warnings of course.