Re: [whatwg/fullscreen] Add FullscreenOptions dictionary to requestFullscreen (#129)

annevk commented on this pull request.

Overall I think this approach is good and allows for diverging UI styles between desktop/mobile and across implementations.

It's not entirely clear to me everyone wants to support this kind of UI, but if there's at least two implementers that do the others can simply not implement the dictionary member I suppose.

> @@ -209,7 +219,22 @@ if all of the following are true, and false otherwise:
  <!-- cross-process, recursive -->
 </ul>
 
-<p>The <dfn method for=Element><code>requestFullscreen()</code></dfn> method, when invoked, must run
+<p>The {{FullscreenOptions}} dictionary can be used to help customize the User Agent UI:

I suspect @foolip will comment on this as well, but this should be defined as part of the method definition.

> @@ -180,8 +190,8 @@ partial interface DocumentOrShadowRoot {
      interface, which is implemented by Document and HTMLElement, not Element. -->
 
 <dl class=domintro>
- <dt><code><var>promise</var> = <var>element</var> . {{Element/requestFullscreen()}}</code>
- <dd><p>Displays <var>element</var> fullscreen and resolves <var>promise</var> when done.
+ <dt><code><var>promise</var> = <var>element</var> . {{Element/requestFullscreen(<var>options</var>)}}</code>
+ <dd><p>Displays <var>element</var> fullscreen with <var>options</var> and resolves <var>promise</var> when done.

This should describe the options members in a way that conveys the meaning to web developers.

> @@ -155,8 +155,18 @@ steps:
 <h2 id=api>API</h2>
 
 <pre class=idl>
+enum <dfn>FullscreenNavigationUI</dfn> {
+  "auto",
+  "show",
+  "hide"
+};
+
+dictionary <dfn>FullscreenOptions</dfn> {
+  FullscreenNavigationUI navigationUI = "auto";
+};

I'd prefer placing these at the end of the IDL block. It's more common to start with the concrete things than the primitives, I think.

-- 
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-149504002

Received on Saturday, 25 August 2018 08:08:39 UTC