Closed marcoscaceres closed 4 years ago
There are other Picture-in-Picture events such as Leave
and Resize
.
This is why the event for entering Picture-in-Picture is prefixed with Enter
.
Couldn't we use just one tho? And then just use the type to say what it is for?
The EnterPictureInPictureEvent
constructor event requires a PictureInPictureWindow
while others actually don't. Having a generic PictureInPictureEvent
that would not apply to leavepictureinpicture
seems weird.
I'm gonna close this issue but let me know if you feel strongly about it and I'll re-open for further discussion.
I found this issue while trying to figure out what happened with EnterPictureInPictureEvent
, which is currently shipping in Safari 14. Turns out the renaming did happen the day after this issue was closed in https://github.com/w3c/picture-in-picture/pull/189.
@pliu6 should be able to help with that. It seems like a simple rename would work for https://github.com/WebKit/WebKit/blob/main/Source/WebCore/Modules/pictureinpicture/EnterPictureInPictureEvent.idl et al.
@foolip @beaufortfrancois Thanks for the reminder! I will follow up in https://bugs.webkit.org/show_bug.cgi?id=221083 and update here when it is done.
That's great, thanks for fixing this, @pliu6!
Seems a bit weird to have "Enter" at the front of
EnterPictureInPictureEvent
... why not just generalize it to "PictureInPictureEvent"?