tor-browser

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

PlacesObservers.webidl (1430B)


      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 callback PlacesEventCallback = undefined (sequence<PlacesEvent> events);
      8 
      9 [ChromeOnly, Exposed=Window]
     10 interface PlacesWeakCallbackWrapper {
     11  constructor(PlacesEventCallback callback);
     12 };
     13 
     14 // Counters for number of events sent in the current session.
     15 [ChromeOnly, Exposed=Window]
     16 interface PlacesEventCounts {
     17  readonly maplike<DOMString, unsigned long long>;
     18 };
     19 
     20 // Global singleton which should handle all events for places.
     21 [ChromeOnly, Exposed=Window]
     22 namespace PlacesObservers {
     23  [Throws]
     24  undefined addListener(sequence<PlacesEventType> eventTypes,
     25                        PlacesEventCallback listener);
     26  [Throws]
     27  undefined addListener(sequence<PlacesEventType> eventTypes,
     28                        PlacesWeakCallbackWrapper listener);
     29  [Throws]
     30  undefined removeListener(sequence<PlacesEventType> eventTypes,
     31                           PlacesEventCallback listener);
     32  [Throws]
     33  undefined removeListener(sequence<PlacesEventType> eventTypes,
     34                           PlacesWeakCallbackWrapper listener);
     35  [Throws]
     36  undefined notifyListeners(sequence<PlacesEvent> events);
     37 
     38  readonly attribute PlacesEventCounts counts;
     39 };