Re: [mediacapture-screen-share] capture screenshot of DOM (#145)

Just remembered that one way to copy an element to some bitmap is with drag and drop api

from MDN:
> If Element is an img element, then set the drag data store bitmap to the element's image (at its intrinsic size); **otherwise, set the drag data store bitmap to an image generated from the given element** (the exact mechanism for doing so is not currently specified).

```js
new DataTransfer().setDragImage(document.body, 0, 0)
```
however it don't seem like there is a way to read that image somehow? missing some vital `getDragImage()` method?
also it's somewhat transparent... 
all doe it could be a grate hack/workaround for some even doe it might not give you the kind of image you would expect to get. (it might just be good enough for some usecases)

-- 
GitHub Notification of comment by jimmywarting
Please view or discuss this issue at https://github.com/w3c/mediacapture-screen-share/issues/145#issuecomment-702089898 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Thursday, 1 October 2020 12:08:16 UTC