- From: Andy Earnshaw <notifications@github.com>
- Date: Thu, 18 Feb 2016 02:53:39 -0800
- To: w3c/webcomponents <webcomponents@noreply.github.com>
Received on Thursday, 18 February 2016 10:54:13 UTC
One of the things we're using Custom Elements/Shadow DOM for is a video player with custom controls. An issue came up yesterday where a client wanted to render the video onto a canvas like this simplified version: ```html <x-video name="vid1" autoplay> ``` ```javascript var vid = document.querySelector('x-video'); canvasContext.drawImage(vid, 0, 0, vid.width, vid.height); ``` Currently, we actually expose the `<video>` element because I actually foresaw problems like this one, so I was able to tell them to use `vid.player` instead. However, I'd certainly prefer not to let developers have access to elements in the shadow tree for obvious reasons. I'm wondering if we could spec something like `shadowRoot.canvasImageSource = htmlVideoElement;` to allow drawing custom elements with shadow trees to canvases. --- Reply to this email directly or view it on GitHub: https://github.com/w3c/webcomponents/issues/388
Received on Thursday, 18 February 2016 10:54:13 UTC