Implement Console grouping APIs.

This commit is contained in:
Josh Matthews 2020-06-25 15:07:00 -04:00
parent e0e976a37a
commit 2d7effddef
4 changed files with 76 additions and 59 deletions

View file

@ -1,25 +1,27 @@
/* 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 https://mozilla.org/MPL/2.0/. */
/*
* References:
* MDN Docs - https://developer.mozilla.org/en-US/docs/Web/API/console
* Draft Spec - https://sideshowbarker.github.io/console-spec/
*
* © Copyright 2014 Mozilla Foundation.
*/
// https://console.spec.whatwg.org/
[ClassString="Console",
Exposed=(Window,Worker,Worklet),
ProtoObjectHack]
namespace console {
// These should be DOMString message, DOMString message2, ...
// Logging
void log(DOMString... messages);
void debug(DOMString... messages);
void info(DOMString... messages);
void warn(DOMString... messages);
void error(DOMString... messages);
void assert(boolean condition, optional DOMString message);
// Grouping
void group(DOMString... data);
void groupCollapsed(DOMString... data);
void groupEnd();
// Timing
void time(DOMString message);
void timeEnd(DOMString message);
};