tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

FetchObserver.webidl (805B)


      1 /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
      2 /* This Source Code Form is subject to the terms of the Mozilla Public
      3 * License, v. 2.0. If a copy of the MPL was not distributed with this file,
      4 * You can obtain one at http://mozilla.org/MPL/2.0/.
      5 */
      6 
      7 [Exposed=Window]
      8 callback interface ObserverCallback {
      9  undefined handleEvent(FetchObserver observer);
     10 };
     11 
     12 enum FetchState {
     13  // Pending states
     14  "requesting", "responding",
     15  // Final states
     16  "aborted", "errored", "complete"
     17 };
     18 
     19 [Exposed=(Window,Worker),
     20 Pref="dom.fetchObserver.enabled"]
     21 interface FetchObserver : EventTarget {
     22  readonly attribute FetchState state;
     23 
     24  // Events
     25  attribute EventHandler onstatechange;
     26  attribute EventHandler onrequestprogress;
     27  attribute EventHandler onresponseprogress;
     28 };