Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
domenic opened this issue Mar 14, 2024 · 2 comments · Fixed by #116
Closed

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

domenic opened this issue Mar 14, 2024 · 2 comments · Fixed by #116

Comments

@domenic
Copy link

domenic commented Mar 14, 2024

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
Copy link
Contributor

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
Copy link
Author

domenic commented Mar 14, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants