WICG / document-picture-in-picture

https://wicg.github.io/document-picture-in-picture/
Other
56 stars 9 forks source link

allowReturnToOpener violates design principle that booleans must default to false #115

Closed domenic closed 5 months ago

domenic commented 5 months ago

See https://webidl.spec.whatwg.org/#dfn-optional-argument-default-value and https://lists.w3.org/Archives/Public/public-script-coord/2013OctDec/0302.html

I suggest renaming to disallowReturnToOpener.

beaufortfrancois commented 5 months ago

From what I can read, those design principes apply to arguments of the form "optional boolean arg = true", not "optional dictionary" that contain a boolean member with a default value.

As you can see in https://source.chromium.org/search?q=f:idl$%20f:renderer%20%22%20%3D%20true%22, there are already plenty of boolean dictionary members that have a default value of true.

domenic commented 5 months ago

Yes, they're all violations of the same principle and considered legacy mistakes. The same reasoning applies for why it's problematic.