See http://www.chromium.org/blink#launch-process for an overview of theBlink launch process.This launch issue is used for standards and implementation tracking only,not for Chrome approval regarding privacy, security, legal, UI, testing,accessibility etc. If your feature requires approval in any of those areasplease additionally create a Type=Launch issue (note you will most likelywant a PM to guide you through the Type=Launch process, guidance can befound at go/newchromefeature)---Change description:
Implement the Background Fetch API: Provide a service worker based download and upload mechanism which is persistent across service worker and browser restarts.
The system should provide a developer-controllable interface to schedule, query, pause, and cancel background downloads and uploads. After a scheduled fetch completes, the system should notify the developer of the outcome of the operation.
In progress downloads and uploads should be handled by the download manager and should be visible to users in a notification. The user should be able to pause and cancel actions from that interface.
Downloads and uploads should continue even if the developer's website is not loaded in a tab, and if Chrome is closed, the download should resume when Chrome opens again.
Changes to API surface:
partial interface ServiceWorkerRegistration {
readonly attribute BackgroundFetchManager backgroundFetch;
};
[Exposed=(Window,Worker)]
interface BackgroundFetchManager {
Promise<BackgroundFetchRegistration> fetch(DOMString tag, (RequestInfo or sequence<RequestInfo>) requests);
Promise<BackgroundFetchRegistration?> getPending(DOMString tag);
Promise<sequence<BackgroundFetchRegistration>> getAllPending();
};
[Exposed=(Window,Worker)]
interface BackgroundFetchRegistration {
readonly attribute DOMString tag;
readonly attribute FrozenArray<Request> requests;
void abort();
};
partial interface ServiceWorkerGlobalScope {
attribute EventHandler onbackgroundfetch;
attribute EventHandler onbackgroundfetcherror;
attribute EventHandler onbackgroundfetchabort;
};
[Constructor(DOMString type, BackgroundFetchEventInit init), Exposed=ServiceWorker]
interface BackgroundFetchEvent : ExtendableEvent {
readonly attribute DOMString tag;
};
dictionary BackgroundFetchEventInit : ExtendableEventInit {
required DOMString tag;
};
[Constructor(DOMString type, BackgroundFetchResultsEventInit init), Exposed=ServiceWorker]
interface BackgroundFetchResultsEvent : BackgroundFetchEvent {
readonly attribute maplike<Request, Response> fetches;
};
dictionary BackgroundFetchResultsEventInit : BackgroundFetchEventInit {
required maplike<Request, Response> fetches;
};
Links:
Public standards discussion: https://github.com/jakearchibald/background-fetchSupport in other browsers:Internet Explorer: No public signals
Firefox: No public signals
Safari: No public signals
Implement the Background Fetch API: Provide a service worker based download and upload mechanism which is persistent across service worker and browser restarts.
The system should provide a developer-controllable interface to schedule, query, pause, and cancel background downloads and uploads. After a scheduled fetch completes, the system should notify the developer of the outcome of the operation.
In progress downloads and uploads should be handled by the download manager and should be visible to users in a notification. The user should be able to pause and cancel actions from that interface.
Downloads and uploads should continue even if the developer's website is not loaded in a tab, and if Chrome is closed, the download should resume when Chrome opens again.
Changes to API surface:
partial interface ServiceWorkerRegistration {
readonly attribute BackgroundFetchManager backgroundFetch;
};
[Exposed=(Window,Worker)]
interface BackgroundFetchManager {
Promise<BackgroundFetchRegistration> fetch(DOMString tag, (RequestInfo or sequence<RequestInfo>) requests);
Promise<BackgroundFetchRegistration?> getPending(DOMString tag);
Promise<sequence<BackgroundFetchRegistration>> getAllPending();
};
[Exposed=(Window,Worker)]
interface BackgroundFetchRegistration {
readonly attribute DOMString tag;
readonly attribute FrozenArray<Request> requests;
void abort();
};
partial interface ServiceWorkerGlobalScope {
attribute EventHandler onbackgroundfetch;
attribute EventHandler onbackgroundfetcherror;
attribute EventHandler onbackgroundfetchabort;
};
[Constructor(DOMString type, BackgroundFetchEventInit init), Exposed=ServiceWorker]
interface BackgroundFetchEvent : ExtendableEvent {
readonly attribute DOMString tag;
};
dictionary BackgroundFetchEventInit : ExtendableEventInit {
required DOMString tag;
};
[Constructor(DOMString type, BackgroundFetchResultsEventInit init), Exposed=ServiceWorker]
interface BackgroundFetchResultsEvent : BackgroundFetchEvent {
readonly attribute maplike<Request, Response> fetches;
};
dictionary BackgroundFetchResultsEventInit : BackgroundFetchEventInit {
required maplike<Request, Response> fetches;
};
Links:
Public standards discussion: https://github.com/jakearchibald/background-fetch
Support in other browsers:
Internet Explorer: No public signals
Firefox: No public signals
Safari: No public signals
This issue has been automatically relabelled type=task because type=launch-owp issues are now officially deprecated. The deprecation is because they were creating confusion about how to get launch approvals, which should be instead done via type=launch issues.
We recommend this issue be used for implementation tracking (for public visibility), but if you already have an issue for that, you may mark this as duplicate.
For more details see here: https://docs.google.com/document/d/1JA6RohjtZQc26bTrGoIE_bSXGXUDQz8vc6G0n_sZJ2o/edit
For any questions, please contact owencm, sshruthi, larforge
Comment 1 by harkness@chromium.org
, Jan 24 2017