Bug 1536321 [wpt PR 15894] - Update interfaces/service-workers.idl, a=testonly

Automatic update from web-platform-tests
Update interfaces/service-workers.idl (#15894)

Source: https://github.com/tidoust/reffy-reports/blob/e0218fe/whatwg/idl/service-workers.idl
Build: https://travis-ci.org/tidoust/reffy-reports/builds/506822321
--

wpt-commits: 8142b088cc4f630c80e941cd5736d00fc2405e02
wpt-pr: 15894
This commit is contained in:
autofoolip 2019-04-15 13:48:28 +00:00 коммит произвёл James Graham
Родитель 53253c1efd
Коммит 50a6199fb9
1 изменённых файлов: 26 добавлений и 4 удалений

Просмотреть файл

@ -1,13 +1,14 @@
// GENERATED CONTENT - DO NOT EDIT
// Content was automatically extracted by Reffy into reffy-reports
// (https://github.com/tidoust/reffy-reports)
// Source: Service Workers 1 (https://w3c.github.io/ServiceWorker/v1/)
// Source: Service Workers Nightly (https://w3c.github.io/ServiceWorker/)
[SecureContext, Exposed=(Window,Worker)]
interface ServiceWorker : EventTarget {
readonly attribute USVString scriptURL;
readonly attribute ServiceWorkerState state;
void postMessage(any message, optional sequence<object> transfer = []);
void postMessage(any message, sequence<object> transfer);
void postMessage(any message, optional PostMessageOptions options);
// event
attribute EventHandler onstatechange;
@ -27,6 +28,7 @@ interface ServiceWorkerRegistration : EventTarget {
readonly attribute ServiceWorker? installing;
readonly attribute ServiceWorker? waiting;
readonly attribute ServiceWorker? active;
[SameObject] readonly attribute NavigationPreloadManager navigationPreload;
readonly attribute USVString scope;
readonly attribute ServiceWorkerUpdateViaCache updateViaCache;
@ -76,6 +78,19 @@ dictionary RegistrationOptions {
ServiceWorkerUpdateViaCache updateViaCache = "imports";
};
[SecureContext, Exposed=(Window,Worker)]
interface NavigationPreloadManager {
Promise<void> enable();
Promise<void> disable();
Promise<void> setHeaderValue(ByteString value);
Promise<NavigationPreloadState> getState();
};
dictionary NavigationPreloadState {
boolean enabled = false;
ByteString headerValue;
};
[Global=(Worker,ServiceWorker), Exposed=ServiceWorker]
interface ServiceWorkerGlobalScope : WorkerGlobalScope {
[SameObject] readonly attribute Clients clients;
@ -98,7 +113,8 @@ interface Client {
readonly attribute FrameType frameType;
readonly attribute DOMString id;
readonly attribute ClientType type;
void postMessage(any message, optional sequence<object> transfer = []);
void postMessage(any message, sequence<object> transfer);
void postMessage(any message, optional PostMessageOptions options);
};
[Exposed=ServiceWorker]
@ -150,14 +166,20 @@ dictionary ExtendableEventInit : EventInit {
[Constructor(DOMString type, FetchEventInit eventInitDict), Exposed=ServiceWorker]
interface FetchEvent : ExtendableEvent {
[SameObject] readonly attribute Request request;
readonly attribute Promise<any> preloadResponse;
readonly attribute DOMString clientId;
readonly attribute DOMString resultingClientId;
readonly attribute DOMString replacesClientId;
void respondWith(Promise<Response> r);
};
dictionary FetchEventInit : ExtendableEventInit {
required Request request;
Promise<any> preloadResponse;
DOMString clientId = "";
DOMString resultingClientId = "";
DOMString replacesClientId = "";
};
[Constructor(DOMString type, optional ExtendableMessageEventInit eventInitDict), Exposed=ServiceWorker]
@ -177,7 +199,7 @@ dictionary ExtendableMessageEventInit : ExtendableEventInit {
sequence<MessagePort> ports = [];
};
partial interface WindowOrWorkerGlobalScope {
partial interface mixin WindowOrWorkerGlobalScope {
[SecureContext, SameObject] readonly attribute CacheStorage caches;
};