Re: [whatwg/fullscreen] `fullscreenchange` should behave like `webkitfullscreenchange` (#89)

I've lately been thinking that this is a good idea as well, for largely the same reasons.

It gets a bit weird when elements are removed or moved between documents, but it is possible to ensure that the event always fires on the same document as currently. The solution is to pick the event target right before dispatch, usually targeting the element, but targeting the original document if the element is no longer connected to it. There is something similar in https://w3c.github.io/webappsec-csp/#report-violation and when I discussed it with @mikewest I had in mind copying the model to Fullscreen.

@upsuper, Gecko is the only engine where the prefixed events target the document as the spec currently describes. There would be some compat risk both if you change it (obviously) and if you make prefixed and unprefixed events behave differently. WDYT?

We could go further and use add these as legacy event types in https://dom.spec.whatwg.org/#concept-event-listener-invoke, but I think that should be considered separately. There's simplicity in doing it, but would also make it possible to use `requestFullscreen()` + `webkitfullscreenchange` together, making it harder to know when one has successfully transitioned to the unprefixed APIs. I'm conflicted.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/fullscreen/issues/89#issuecomment-302350893

Received on Thursday, 18 May 2017 09:26:12 UTC