michael@0: /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ michael@0: /* This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: michael@0: #include "nsISupports.idl" michael@0: michael@0: [scriptable, uuid(6701600a-17ca-417e-98f9-4ceb175dd15d)] michael@0: interface nsIConsoleAPIStorage : nsISupports michael@0: { michael@0: /** michael@0: * Get the events array by inner window ID or all events from all windows. michael@0: * michael@0: * @param string [aId] michael@0: * Optional, the inner window ID for which you want to get the array of michael@0: * cached events. michael@0: * @returns array michael@0: * The array of cached events for the given window. If no |aId| is michael@0: * given this function returns all of the cached events, from any michael@0: * window. michael@0: */ michael@0: jsval getEvents([optional] in DOMString aId); michael@0: michael@0: /** michael@0: * Record an event associated with the given window ID. michael@0: * michael@0: * @param string aId michael@0: * The ID of the inner window for which the event occurred or "jsm" for michael@0: * messages logged from JavaScript modules.. michael@0: * @param object aEvent michael@0: * A JavaScript object you want to store. michael@0: */ michael@0: void recordEvent(in DOMString aId, in jsval aEvent); michael@0: michael@0: /** michael@0: * Clear storage data for the given window. michael@0: * michael@0: * @param string [aId] michael@0: * Optional, the inner window ID for which you want to clear the michael@0: * messages. If this is not specified all of the cached messages are michael@0: * cleared, from all window objects. michael@0: */ michael@0: void clearEvents([optional] in DOMString aId); michael@0: };