Skip to content

Commit

Permalink
Set default value of optional dictionary to {}
Browse files Browse the repository at this point in the history
  • Loading branch information
CYBAI committed Jul 11, 2019
1 parent 7c07a47 commit 211d2ca
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions docs/index.bs
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,7 @@ spec: webappsec-referrer-policy; urlPrefix: https://w3c.github.io/webappsec-refe
readonly attribute USVString scriptURL;
readonly attribute ServiceWorkerState state;
void postMessage(any message, sequence<object> transfer);
void postMessage(any message, optional PostMessageOptions options);
void postMessage(any message, optional PostMessageOptions options = {});

// event
attribute EventHandler onstatechange;
Expand Down Expand Up @@ -624,7 +624,7 @@ spec: webappsec-referrer-policy; urlPrefix: https://w3c.github.io/webappsec-refe
readonly attribute ServiceWorker? controller;
readonly attribute Promise<ServiceWorkerRegistration> ready;

[NewObject] Promise<ServiceWorkerRegistration> register(USVString scriptURL, optional RegistrationOptions options);
[NewObject] Promise<ServiceWorkerRegistration> register(USVString scriptURL, optional RegistrationOptions options = {});

[NewObject] Promise<any> getRegistration(optional USVString clientURL = "");
[NewObject] Promise<FrozenArray<ServiceWorkerRegistration>> getRegistrations();
Expand Down Expand Up @@ -1049,7 +1049,7 @@ spec: webappsec-referrer-policy; urlPrefix: https://w3c.github.io/webappsec-refe
readonly attribute DOMString id;
readonly attribute ClientType type;
void postMessage(any message, sequence<object> transfer);
void postMessage(any message, optional PostMessageOptions options);
void postMessage(any message, optional PostMessageOptions options = {});
};

[Exposed=ServiceWorker]
Expand Down Expand Up @@ -1222,7 +1222,7 @@ spec: webappsec-referrer-policy; urlPrefix: https://w3c.github.io/webappsec-refe
interface Clients {
// The objects returned will be new instances every time
[NewObject] Promise<any> get(DOMString id);
[NewObject] Promise<FrozenArray<Client>> matchAll(optional ClientQueryOptions options);
[NewObject] Promise<FrozenArray<Client>> matchAll(optional ClientQueryOptions options = {});
[NewObject] Promise<WindowClient?> openWindow(USVString url);
[NewObject] Promise<void> claim();
};
Expand Down Expand Up @@ -1370,7 +1370,7 @@ spec: webappsec-referrer-policy; urlPrefix: https://w3c.github.io/webappsec-refe
<h3 id="extendableevent-interface">{{ExtendableEvent}}</h3>

<pre class="idl">
[Constructor(DOMString type, optional ExtendableEventInit eventInitDict), Exposed=ServiceWorker]
[Constructor(DOMString type, optional ExtendableEventInit eventInitDict = {}), Exposed=ServiceWorker]
interface ExtendableEvent : Event {
void waitUntil(Promise&lt;any&gt; f);
};
Expand Down Expand Up @@ -1558,7 +1558,7 @@ spec: webappsec-referrer-policy; urlPrefix: https://w3c.github.io/webappsec-refe
<h3 id="extendablemessageevent-interface">{{ExtendableMessageEvent}}</h3>

<pre class="idl">
[Constructor(DOMString type, optional ExtendableMessageEventInit eventInitDict), Exposed=ServiceWorker]
[Constructor(DOMString type, optional ExtendableMessageEventInit eventInitDict = {}), Exposed=ServiceWorker]
interface ExtendableMessageEvent : ExtendableEvent {
readonly attribute any data;
readonly attribute USVString origin;
Expand Down Expand Up @@ -1743,13 +1743,13 @@ spec: webappsec-referrer-policy; urlPrefix: https://w3c.github.io/webappsec-refe
<pre class="idl">
[SecureContext, Exposed=(Window,Worker)]
interface Cache {
[NewObject] Promise&lt;any&gt; match(RequestInfo request, optional CacheQueryOptions options);
[NewObject] Promise&lt;FrozenArray&lt;Response&gt;&gt; matchAll(optional RequestInfo request, optional CacheQueryOptions options);
[NewObject] Promise&lt;any&gt; match(RequestInfo request, optional CacheQueryOptions options = {});
[NewObject] Promise&lt;FrozenArray&lt;Response&gt;&gt; matchAll(optional RequestInfo request, optional CacheQueryOptions options = {});
[NewObject] Promise&lt;void&gt; add(RequestInfo request);
[NewObject] Promise&lt;void&gt; addAll(sequence&lt;RequestInfo&gt; requests);
[NewObject] Promise&lt;void&gt; put(RequestInfo request, Response response);
[NewObject] Promise&lt;boolean&gt; delete(RequestInfo request, optional CacheQueryOptions options);
[NewObject] Promise&lt;FrozenArray&lt;Request&gt;&gt; keys(optional RequestInfo request, optional CacheQueryOptions options);
[NewObject] Promise&lt;boolean&gt; delete(RequestInfo request, optional CacheQueryOptions options = {});
[NewObject] Promise&lt;FrozenArray&lt;Request&gt;&gt; keys(optional RequestInfo request, optional CacheQueryOptions options = {});
};
</pre>
<pre class="idl" id="cache-query-options-dictionary">
Expand Down Expand Up @@ -2000,7 +2000,7 @@ spec: webappsec-referrer-policy; urlPrefix: https://w3c.github.io/webappsec-refe
<pre class="idl">
[SecureContext, Exposed=(Window,Worker)]
interface CacheStorage {
[NewObject] Promise&lt;any&gt; match(RequestInfo request, optional MultiCacheQueryOptions options);
[NewObject] Promise&lt;any&gt; match(RequestInfo request, optional MultiCacheQueryOptions options = {});
[NewObject] Promise&lt;boolean&gt; has(DOMString cacheName);
[NewObject] Promise&lt;Cache&gt; open(DOMString cacheName);
[NewObject] Promise&lt;boolean&gt; delete(DOMString cacheName);
Expand Down

0 comments on commit 211d2ca

Please sign in to comment.