dom/webidl/Console.webidl

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/dom/webidl/Console.webidl	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,93 @@
     1.4 +/* -*- Mode: IDL; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
     1.5 +/* vim: set ts=2 et sw=2 tw=80: */
     1.6 +/* This Source Code Form is subject to the terms of the Mozilla Public
     1.7 + * License, v. 2.0. If a copy of the MPL was not distributed with this
     1.8 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
     1.9 +
    1.10 +[ChromeOnly]
    1.11 +interface Console {
    1.12 +  void log(any... data);
    1.13 +  void info(any... data);
    1.14 +  void warn(any... data);
    1.15 +  void error(any... data);
    1.16 +  void _exception(any... data);
    1.17 +  void debug(any... data);
    1.18 +  void trace();
    1.19 +  void dir(any... data);
    1.20 +  void group(any... data);
    1.21 +  void groupCollapsed(any... data);
    1.22 +  void groupEnd(any... data);
    1.23 +  void time(optional any time);
    1.24 +  void timeEnd(optional any time);
    1.25 +
    1.26 +  void profile(any... data);
    1.27 +  void profileEnd(any... data);
    1.28 +
    1.29 +  void assert(boolean condition, any... data);
    1.30 +  void count(any... data);
    1.31 +
    1.32 +  void ___noSuchMethod__();
    1.33 +};
    1.34 +
    1.35 +// This is used to propagate console events to the observers.
    1.36 +dictionary ConsoleEvent {
    1.37 +  (unsigned long or DOMString) ID;
    1.38 +  (unsigned long or DOMString) innerID;
    1.39 +  DOMString level = "";
    1.40 +  DOMString filename = "";
    1.41 +  unsigned long lineNumber = 0;
    1.42 +  DOMString functionName = "";
    1.43 +  double timeStamp = 0;
    1.44 +  sequence<any> arguments;
    1.45 +
    1.46 +  // This array will only hold strings or null elements.
    1.47 +  sequence<any> styles;
    1.48 +
    1.49 +  boolean private = false;
    1.50 +  // stacktrace is handled via a getter in some cases so we can construct it
    1.51 +  // lazily.  Note that we're not making this whole thing an interface because
    1.52 +  // consumers expect to see own properties on it, which would mean making the
    1.53 +  // props unforgeable, which means lots of JSFunction allocations.  Maybe we
    1.54 +  // should fix those consumers, of course....
    1.55 +  // sequence<ConsoleStackEntry> stacktrace;
    1.56 +  DOMString groupName = "";
    1.57 +  any timer = null;
    1.58 +  any counter = null;
    1.59 +};
    1.60 +
    1.61 +// Event for profile operations
    1.62 +dictionary ConsoleProfileEvent {
    1.63 +  DOMString action = "";
    1.64 +  sequence<any> arguments;
    1.65 +};
    1.66 +
    1.67 +// This dictionary is used to manage stack trace data.
    1.68 +dictionary ConsoleStackEntry {
    1.69 +  DOMString filename = "";
    1.70 +  unsigned long lineNumber = 0;
    1.71 +  DOMString functionName = "";
    1.72 +  unsigned long language = 0;
    1.73 +};
    1.74 +
    1.75 +dictionary ConsoleTimerStart {
    1.76 +  DOMString name = "";
    1.77 +  double started = 0;
    1.78 +};
    1.79 +
    1.80 +dictionary ConsoleTimerEnd {
    1.81 +  DOMString name = "";
    1.82 +  double duration = 0;
    1.83 +};
    1.84 +
    1.85 +dictionary ConsoleTimerError {
    1.86 +  DOMString error = "maxTimersExceeded";
    1.87 +};
    1.88 +
    1.89 +dictionary ConsoleCounter {
    1.90 +  DOMString label = "";
    1.91 +  unsigned long count = 0;
    1.92 +};
    1.93 +
    1.94 +dictionary ConsoleCounterError {
    1.95 +  DOMString error = "maxCountersExceeded";
    1.96 +};

mercurial