chromium/third_party/blink/renderer/core/fetch/fetch_later.idl

// Copyright 2023 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

// https://whatpr.org/fetch/1647/9ca4bda...9994c1d.html#dom-global-fetch-later

[
    ImplementedAs=FetchLaterResult,
    RuntimeEnabled=FetchLaterAPI,
    Exposed=Window,
    SecureContext
]
interface FetchLaterResult {
  [Measure] readonly attribute boolean activated;
};

[
    ImplementedAs=GlobalFetch,
    RuntimeEnabled=FetchLaterAPI,
    SecureContext
] partial interface Window {
    [
        CallWith=ScriptState,
        Measure,
        NewObject,
        RaisesException
    ] FetchLaterResult fetchLater(RequestInfo input, optional DeferredRequestInit init = {});
};


// TODO(crbug.com/1465781): Support WorkerGlobalScope once fetch keepalive
// supports it.