w3c / picture-in-picture

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

disablePictureInPicture should initialize to false #144

Closed marcoscaceres closed 4 years ago

marcoscaceres commented 5 years ago

Spec says:

  1. OPTIONALLY, if the {{disablePictureInPicture}} attribute is present on |video|, throw an {{InvalidStateError}} and abort these steps.

I think here you want to check the value of the IDL attribute value, no? It would be weird if the disablePictureInPicture conditionally appeared and disappeared.

What is confusing here is that the specs seems to be talking about the HTML attribute itself being present... but what matters more (or what is easier to check) is the value being reflected in the IDL attribute (so maybe just initialize it to false).

beaufortfrancois commented 5 years ago

How would you rephrase it? We do have this line. Is it not enough?

The disablePictureInPicture IDL attribute MUST reflect the content attribute of the same name.

beaufortfrancois commented 4 years ago

@marcoscaceres I'm still not sure what you meant. Shall I explicitly add IDL before attribute to avoid confusion?

OPTIONALLY, if the {{disablePictureInPicture}} IDL attribute is present on |video|, throw an {{InvalidStateError}} and abort these steps.