Bumping gaia.json for 8 gaia revision(s) a=gaia-bump
[gecko.git] / dom / base / nsIConsoleAPIStorage.idl
blob262ae76b498b7be109e775a99d7eade11cebb3b4
1 /* -*- Mode: C++; 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
4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
6 #include "nsISupports.idl"
8 [scriptable, uuid(cce39123-585e-411b-9edd-2513f7cf7e47)]
9 interface nsIConsoleAPIStorage : nsISupports
11 /**
12 * Get the events array by inner window ID or all events from all windows.
14 * @param string [aId]
15 * Optional, the inner window ID for which you want to get the array of
16 * cached events.
17 * @returns array
18 * The array of cached events for the given window. If no |aId| is
19 * given this function returns all of the cached events, from any
20 * window.
22 jsval getEvents([optional] in DOMString aId);
24 /**
25 * Record an event associated with the given window ID.
27 * @param string aId
28 * The ID of the inner window for which the event occurred or "jsm" for
29 * messages logged from JavaScript modules..
30 * @param string aOuterId
31 * This ID is used as 3rd parameters for the console-api-log-event
32 * notification.
33 * @param object aEvent
34 * A JavaScript object you want to store.
36 void recordEvent(in DOMString aId, in DOMString aOuterId, in jsval aEvent);
38 /**
39 * Similar to recordEvent() but these events will be collected
40 * and dispatched with a timer in order to avoid flooding the devtools
41 * webconsole.
43 * @param string aId
44 * The ID of the inner window for which the event occurred or "jsm" for
45 * messages logged from JavaScript modules..
46 * @param string aOuterId
47 * This ID is used as 3rd parameters for the console-api-log-event
48 * notification.
49 * @param object aEvent
50 * A JavaScript object you want to store.
52 void recordPendingEvent(in DOMString aId, in DOMString aOuterId, in jsval aEvent);
54 /**
55 * Clear storage data for the given window.
57 * @param string [aId]
58 * Optional, the inner window ID for which you want to clear the
59 * messages. If this is not specified all of the cached messages are
60 * cleared, from all window objects.
62 void clearEvents([optional] in DOMString aId);