- From: Philip Jägenstedt <notifications@github.com>
- Date: Wed, 20 Jun 2018 11:15:35 +0000 (UTC)
- To: whatwg/fullscreen <fullscreen@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
Received on Wednesday, 20 June 2018 11:16:03 UTC
foolip commented on this pull request.
> @@ -155,8 +155,12 @@ steps:
<h2 id=api>API</h2>
<pre class=idl>
+dictionary <dfn>FullscreenOptions</dfn> {
+ boolean prefersNavigationBar = true;
As a rule of thumb, to which there are only a few exceptions, optional boolean dictionary members should default to false. This is because undefined is a falsy value, but treated the same as missing, which means that `{ prefersNavigationBar: undefined }` behaves like `{ prefersNavigationBar: true }`, which is surprising.
Is there another possible name which would invert the default? An enum is also an option which gets around the problem.
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/fullscreen/pull/129#pullrequestreview-130344736
Received on Wednesday, 20 June 2018 11:16:03 UTC