1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/dom/base/nsIConsoleAPIStorage.idl Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,44 @@ 1.4 +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ 1.5 +/* This Source Code Form is subject to the terms of the Mozilla Public 1.6 + * License, v. 2.0. If a copy of the MPL was not distributed with this 1.7 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 1.8 + 1.9 +#include "nsISupports.idl" 1.10 + 1.11 +[scriptable, uuid(6701600a-17ca-417e-98f9-4ceb175dd15d)] 1.12 +interface nsIConsoleAPIStorage : nsISupports 1.13 +{ 1.14 + /** 1.15 + * Get the events array by inner window ID or all events from all windows. 1.16 + * 1.17 + * @param string [aId] 1.18 + * Optional, the inner window ID for which you want to get the array of 1.19 + * cached events. 1.20 + * @returns array 1.21 + * The array of cached events for the given window. If no |aId| is 1.22 + * given this function returns all of the cached events, from any 1.23 + * window. 1.24 + */ 1.25 + jsval getEvents([optional] in DOMString aId); 1.26 + 1.27 + /** 1.28 + * Record an event associated with the given window ID. 1.29 + * 1.30 + * @param string aId 1.31 + * The ID of the inner window for which the event occurred or "jsm" for 1.32 + * messages logged from JavaScript modules.. 1.33 + * @param object aEvent 1.34 + * A JavaScript object you want to store. 1.35 + */ 1.36 + void recordEvent(in DOMString aId, in jsval aEvent); 1.37 + 1.38 + /** 1.39 + * Clear storage data for the given window. 1.40 + * 1.41 + * @param string [aId] 1.42 + * Optional, the inner window ID for which you want to clear the 1.43 + * messages. If this is not specified all of the cached messages are 1.44 + * cleared, from all window objects. 1.45 + */ 1.46 + void clearEvents([optional] in DOMString aId); 1.47 +};