|
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/. */ |
|
5 |
|
6 #include "nsISupports.idl" |
|
7 |
|
8 [scriptable, uuid(6701600a-17ca-417e-98f9-4ceb175dd15d)] |
|
9 interface nsIConsoleAPIStorage : nsISupports |
|
10 { |
|
11 /** |
|
12 * Get the events array by inner window ID or all events from all windows. |
|
13 * |
|
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. |
|
21 */ |
|
22 jsval getEvents([optional] in DOMString aId); |
|
23 |
|
24 /** |
|
25 * Record an event associated with the given window ID. |
|
26 * |
|
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 object aEvent |
|
31 * A JavaScript object you want to store. |
|
32 */ |
|
33 void recordEvent(in DOMString aId, in jsval aEvent); |
|
34 |
|
35 /** |
|
36 * Clear storage data for the given window. |
|
37 * |
|
38 * @param string [aId] |
|
39 * Optional, the inner window ID for which you want to clear the |
|
40 * messages. If this is not specified all of the cached messages are |
|
41 * cleared, from all window objects. |
|
42 */ |
|
43 void clearEvents([optional] in DOMString aId); |
|
44 }; |