w3c / picture-in-picture

Picture-in-Picture (PiP)
https://w3c.github.io/picture-in-picture
Other
311 stars 39 forks source link

Fire an event steps are not quite right #146

Closed marcoscaceres closed 5 years ago

marcoscaceres commented 5 years ago

Just a minor thing, but in:

Queue a task to fire an event with the name enterpictureinpicture at the video with its bubbles attribute initialized to true and its pictureInPictureWindow attribute initialized to Picture-in-Picture window.

According to DOM's specs rules for firing an event, you should be. passing the Interface name to use there (i.e., EnterPictureInPictureEvent).

From DOM:

To fire an event named e at target, optionally using an eventConstructor, with a description of how IDL attributes are to be initialized, and a legacy target override flag, run these steps:

So, something more like:

Queue a task to fire an event with the name "enterpictureinpicture", using {{EnterPictureInPictureEvent}}. at the video with its bubbles attribute initialized to true and its pictureInPictureWindow attribute initialized to Picture-in-Picture window.