From c84710d062dfa4b39f0aa819a61c91d513ab5d1b Mon Sep 17 00:00:00 2001 From: Benjamin Zaslavsky Date: Mon, 20 Nov 2017 17:12:20 +0100 Subject: console: make dirxml an alias for console.log MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This method was previously exposed by V8 (since node 8.0.0) but not implemented in node. PR-URL: https://github.com/nodejs/node/pull/17152 Refs: https://github.com/nodejs/node/issues/17128 Reviewed-By: Timothy Gu Reviewed-By: Colin Ihrig Reviewed-By: Tobias Nießen Reviewed-By: Anatoli Papirovski Reviewed-By: Rich Trott Reviewed-By: James M Snell --- doc/api/console.md | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) (limited to 'doc/api/console.md') diff --git a/doc/api/console.md b/doc/api/console.md index ba1505ec1d..d942104365 100644 --- a/doc/api/console.md +++ b/doc/api/console.md @@ -277,6 +277,19 @@ Defaults to `2`. To make it recurse indefinitely, pass `null`. Defaults to `false`. Colors are customizable; see [customizing `util.inspect()` colors][]. +### console.dirxml(...data) + +* `...data` {any} + +This method calls `console.log()` passing it the arguments received. +Please note that this method does not produce any XML formatting. + ### console.error([data][, ...args]) -* `object` {string} - -This method does not display anything unless used in the inspector. The -`console.dirxml()` method displays in `stdout` an XML interactive tree -representation of the descendants of the specified `object` if possible, or the -JavaScript representation if not. Calling `console.dirxml()` on an HTML or XML -element is equivalent to calling `console.log()`. - ### console.markTimeline(label)