2014-02-28 03:39:00 +04:00
|
|
|
/* -*- Mode: IDL; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
|
|
|
/* vim: set ts=2 et sw=2 tw=80: */
|
|
|
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
|
|
|
|
2014-08-05 06:20:34 +04:00
|
|
|
[ChromeOnly,
|
2016-02-11 20:51:37 +03:00
|
|
|
Exposed=(Window,Worker,WorkerDebugger)]
|
2014-02-28 03:39:00 +04:00
|
|
|
interface Console {
|
|
|
|
void log(any... data);
|
|
|
|
void info(any... data);
|
|
|
|
void warn(any... data);
|
|
|
|
void error(any... data);
|
|
|
|
void _exception(any... data);
|
|
|
|
void debug(any... data);
|
2014-08-28 02:32:32 +04:00
|
|
|
void table(any... data);
|
2014-02-28 03:39:00 +04:00
|
|
|
void trace();
|
|
|
|
void dir(any... data);
|
2015-04-29 18:34:00 +03:00
|
|
|
void dirxml(any... data);
|
2014-02-28 03:39:00 +04:00
|
|
|
void group(any... data);
|
|
|
|
void groupCollapsed(any... data);
|
|
|
|
void groupEnd(any... data);
|
2014-04-04 07:32:11 +04:00
|
|
|
void time(optional any time);
|
|
|
|
void timeEnd(optional any time);
|
2015-04-29 22:48:57 +03:00
|
|
|
void timeStamp(optional any data);
|
2016-04-13 17:33:43 +03:00
|
|
|
void clear(any... data);
|
2014-02-28 03:39:00 +04:00
|
|
|
|
|
|
|
void profile(any... data);
|
|
|
|
void profileEnd(any... data);
|
|
|
|
|
|
|
|
void assert(boolean condition, any... data);
|
2014-02-28 03:39:24 +04:00
|
|
|
void count(any... data);
|
|
|
|
|
2015-03-06 11:50:51 +03:00
|
|
|
// No-op methods for compatibility with other browsers.
|
|
|
|
[BinaryName="noopMethod"]
|
|
|
|
void markTimeline();
|
|
|
|
[BinaryName="noopMethod"]
|
|
|
|
void timeline();
|
|
|
|
[BinaryName="noopMethod"]
|
|
|
|
void timelineEnd();
|
2014-02-28 03:39:00 +04:00
|
|
|
};
|
|
|
|
|
|
|
|
// This is used to propagate console events to the observers.
|
|
|
|
dictionary ConsoleEvent {
|
2015-03-17 14:13:00 +03:00
|
|
|
(unsigned long long or DOMString) ID;
|
|
|
|
(unsigned long long or DOMString) innerID;
|
2016-04-01 14:55:40 +03:00
|
|
|
any originAttributes = null;
|
2014-02-28 03:39:00 +04:00
|
|
|
DOMString level = "";
|
|
|
|
DOMString filename = "";
|
|
|
|
unsigned long lineNumber = 0;
|
2014-09-22 22:27:59 +04:00
|
|
|
unsigned long columnNumber = 0;
|
2014-02-28 03:39:00 +04:00
|
|
|
DOMString functionName = "";
|
|
|
|
double timeStamp = 0;
|
|
|
|
sequence<any> arguments;
|
2016-02-13 19:08:17 +03:00
|
|
|
sequence<DOMString?> styles;
|
2014-02-28 03:39:00 +04:00
|
|
|
boolean private = false;
|
2014-04-16 06:58:44 +04:00
|
|
|
// stacktrace is handled via a getter in some cases so we can construct it
|
|
|
|
// lazily. Note that we're not making this whole thing an interface because
|
|
|
|
// consumers expect to see own properties on it, which would mean making the
|
|
|
|
// props unforgeable, which means lots of JSFunction allocations. Maybe we
|
|
|
|
// should fix those consumers, of course....
|
|
|
|
// sequence<ConsoleStackEntry> stacktrace;
|
2014-02-28 03:39:00 +04:00
|
|
|
DOMString groupName = "";
|
|
|
|
any timer = null;
|
2014-02-28 03:39:24 +04:00
|
|
|
any counter = null;
|
2014-02-28 03:39:00 +04:00
|
|
|
};
|
|
|
|
|
|
|
|
// Event for profile operations
|
|
|
|
dictionary ConsoleProfileEvent {
|
|
|
|
DOMString action = "";
|
|
|
|
sequence<any> arguments;
|
|
|
|
};
|
|
|
|
|
|
|
|
// This dictionary is used to manage stack trace data.
|
|
|
|
dictionary ConsoleStackEntry {
|
|
|
|
DOMString filename = "";
|
|
|
|
unsigned long lineNumber = 0;
|
2014-09-22 22:27:59 +04:00
|
|
|
unsigned long columnNumber = 0;
|
2014-02-28 03:39:00 +04:00
|
|
|
DOMString functionName = "";
|
|
|
|
unsigned long language = 0;
|
2015-10-21 09:40:00 +03:00
|
|
|
DOMString? asyncCause;
|
2014-02-28 03:39:00 +04:00
|
|
|
};
|
|
|
|
|
|
|
|
dictionary ConsoleTimerStart {
|
|
|
|
DOMString name = "";
|
|
|
|
double started = 0;
|
|
|
|
};
|
|
|
|
|
|
|
|
dictionary ConsoleTimerEnd {
|
|
|
|
DOMString name = "";
|
|
|
|
double duration = 0;
|
|
|
|
};
|
|
|
|
|
|
|
|
dictionary ConsoleTimerError {
|
|
|
|
DOMString error = "maxTimersExceeded";
|
|
|
|
};
|
2014-02-28 03:39:24 +04:00
|
|
|
|
|
|
|
dictionary ConsoleCounter {
|
|
|
|
DOMString label = "";
|
|
|
|
unsigned long count = 0;
|
|
|
|
};
|
|
|
|
|
|
|
|
dictionary ConsoleCounterError {
|
|
|
|
DOMString error = "maxCountersExceeded";
|
|
|
|
};
|