Re: [webcomponents] [Shadow] How should element.requestFullscreen(); work in shadow dom (bugzilla: 27379) (#180)

What are the questions that need to be asked here?  Chrome already seems to support setting a shadowy element to fullscreen as long as there's no fullscreen element already.

Here's a use case I have, maybe it will help with figuring this out.  I have a shadow root on a {{<my-video>}} element which could contain a HTML5 video or a YouTube embed (iframe), and a set of custom controls.  Both the controls and the video are wrapped in another element.  If a user clicks the "go fullscreen" button on those controls, I want the wrapping element to go full screen. Setting the wrapping element to full screen seems to make more sense than the custom element because external styles won't apply to the wrapping element inside the shadow tree, so we can (more or less) guarantee that it will look right.

`document.fullscreenElement` should probably reference the host, similar to how an iframe would be returned if an element in its document is set to fullscreen.  I guess the problem there is, how do you tell which element in the shadow tree is set to fullscreen if there might be more than one? `matches(':fullscreen')`, maybe?

---
Reply to this email directly or view it on GitHub:
https://github.com/w3c/webcomponents/issues/180#issuecomment-143752619

Received on Monday, 28 September 2015 14:08:11 UTC