From b5a5e973842fed271210ce919a309745b9bfa30a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartek=20Iwa=C5=84czuk?= Date: Thu, 29 Aug 2019 16:56:27 +0200 Subject: add console.dirxml (#2835) --- js/console.ts | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'js/console.ts') diff --git a/js/console.ts b/js/console.ts index ed2543a9d..db6a87296 100644 --- a/js/console.ts +++ b/js/console.ts @@ -526,6 +526,18 @@ export class Console { this.printFunc(stringifyArgs([obj], options) + "\n", false); }; + /** From MDN: + * Displays an interactive tree of the descendant elements of + * the specified XML/HTML element. If it is not possible to display + * as an element the JavaScript Object view is shown instead. + * The output is presented as a hierarchical listing of expandable + * nodes that let you see the contents of child nodes. + * + * Since we write to stdout, we can't display anything interactive + * we just fall back to `console.dir`. + */ + dirxml = this.dir; + /** Writes the arguments to stdout */ warn = (...args: unknown[]): void => { this.printFunc( -- cgit v1.2.3