blob: 6e50b5a3ee29bd9319f5fc3b6c75540bdb59ca6f [file] [log] [blame]
// Copyright 2017 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// https://wicg.github.io/background-fetch/#background-fetch-registration
[
Exposed=(Window,Worker),
RuntimeEnabled=BackgroundFetch
] interface BackgroundFetchRegistration : EventTarget {
readonly attribute DOMString id;
readonly attribute unsigned long long uploadTotal;
readonly attribute unsigned long long uploaded;
readonly attribute unsigned long long downloadTotal;
readonly attribute unsigned long long downloaded;
// TODO(crbug.com/699957): Implement the `activeFetches` attribute.
attribute EventHandler onprogress;
[CallWith=ScriptState] Promise<bool> abort();
// TODO(crbug.com/769770): Remove the following deprecated attributes.
[ImplementedAs=downloadTotal] readonly attribute long totalDownloadSize;
};