w3c / picture-in-picture

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

s/Element/HTMLVideoElement for pictureInPictureElement #39

Closed beaufortfrancois closed 6 years ago

mounirlamouri commented 6 years ago

I'm not fully against this but it was on purpose to make sure we were forward compatible. I think that your change wouldn't break backward compatibility though so maybe no big deal but I'm not sure it's needed either way. With a section is the spec explaining why it's Element and not HTMLVideoElement would your concerns be addressed?

beaufortfrancois commented 6 years ago

I'd like as much as possible our spec to reflect the intent of this first version which is that it applies only to a HTMLVideoElement. A section explaining why may help, but as this change wouldn't break backward compatibility, I'd suggest we simply use HTMLVideoElement over Element:


partial interface DocumentOrShadowRoot {
-  readonly attribute Element? pictureInPictureElement;
+  readonly attribute HTMLVideoElement? pictureInPictureElement;
};