Bug 1890793: Assert CallArgs::newTarget is not gray. r=spidermonkey-reviewers,sfink...
[gecko.git] / dom / chrome-webidl / PlacesObservers.webidl
blob77c917a3c5217aabfb1e93925c2c2692a2147452
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  */
7 callback PlacesEventCallback = undefined (sequence<PlacesEvent> events);
9 [ChromeOnly, Exposed=Window]
10 interface PlacesWeakCallbackWrapper {
11   constructor(PlacesEventCallback callback);
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>;
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);
38   readonly attribute PlacesEventCounts counts;