Auto merge of #27088 - jdm:group, r=ferjm

Implement Console grouping APIs.

These are used by Hubs and other sites we want to run.

---
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix #9274
- [x] These changes do not require tests because we can't test stdout content or devtools messages.
This commit is contained in:
bors-servo 2020-07-07 01:24:03 -04:00 committed by GitHub
commit cbbbe16936
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
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);
};