Skip to content

Commit 3ce6e60

Browse files
committed
Add missing methods to Console
1 parent 03cdc02 commit 3ce6e60

File tree

1 file changed

+101
-0
lines changed

1 file changed

+101
-0
lines changed

src/main/scala/org/scalajs/dom/raw/lib.scala

Lines changed: 101 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7436,6 +7436,16 @@ trait Console extends js.Object {
74367436
*/
74377437
def dir(value: js.Any, optionalParams: js.Any*): Unit = js.native
74387438

7439+
/**
7440+
* Displays an interactive tree of the descendant elements of the specified XML/HTML element.
7441+
* If it is not possible to display as an element the JavaScript Object view is shown instead.
7442+
* The output is presented as a hierarchical listing of expandable nodes that let you see the
7443+
* contents of child nodes.
7444+
*
7445+
* MDN
7446+
*/
7447+
def dirxml(value: js.Any): Unit = js.native
7448+
74397449
/**
74407450
* Outputs a warning message. You may use string substitution and additional
74417451
* arguments with this method. See Using string substitutions.
@@ -7460,7 +7470,98 @@ trait Console extends js.Object {
74607470
*/
74617471
def log(message: js.Any, optionalParams: js.Any*): Unit = js.native
74627472

7473+
/**
7474+
* Outputs a debug message. You may use string substitution and additional
7475+
* arguments with this method. See Using string substitutions.
7476+
*
7477+
* MDN
7478+
*/
7479+
def debug(message: js.Any, optionalParams: js.Any*): Unit = js.native
7480+
7481+
/**
7482+
* Displays tabular data as a table.
7483+
*
7484+
* This function takes one mandatory argument data, which must be an array or an object,
7485+
* and one additional optional parameter columns.
7486+
*
7487+
* It logs data as a table. Each element in the array (or enumerable property if data
7488+
* is an object) will be a row in the table.
7489+
*
7490+
* The first column in the table will be labeled (index). If data is an array,
7491+
* then its values will be the array indices. If data is an object, then its values
7492+
* will be the property names. Note that (in Firefox) console.table is limited to
7493+
* displaying 1000 rows (first row is the labeled index).
7494+
*
7495+
* MDN
7496+
*/
7497+
def table(data: js.Object | js.Array[_], columns: js.UndefOr[Int] = js.undefined): Unit = js.native
7498+
7499+
/**
7500+
* Outputs a stack trace to the Web Console.
7501+
*
7502+
* MDN
7503+
*/
7504+
def trace(): Unit = js.native
7505+
74637506
def profileEnd(): Unit = js.native
7507+
7508+
/**
7509+
* Starts a timer you can use to track how long an operation takes.
7510+
* You give each timer a unique name, and may have up to 10,000 timers running on a given page.
7511+
* When you call console.timeEnd() with the same name, the browser will output the time,
7512+
* in milliseconds, that elapsed since the timer was started.
7513+
*
7514+
* MDN
7515+
*/
7516+
def time(label: String): Unit = js.native
7517+
7518+
/**
7519+
* Stops a timer that was previously started by calling console.time().
7520+
*
7521+
* MDN
7522+
*/
7523+
def timeEnd(label: String): Unit = js.native
7524+
7525+
/**
7526+
* Logs the number of times that this particular call to count() has been called.
7527+
* This function takes an optional argument label.
7528+
*
7529+
* MDN
7530+
*/
7531+
def count(label: String = "default"): Unit = js.native
7532+
7533+
/**
7534+
* Resets the counter. This function takes an optional argument label.
7535+
*
7536+
* MDN
7537+
*/
7538+
def countReset(label: String = "default"): Unit = js.native
7539+
7540+
/**
7541+
* Creates a new inline group in the Web Console log. This indents following
7542+
* console messages by an additional level, until console.groupEnd() is called.
7543+
*
7544+
* MDN
7545+
*/
7546+
def group(label: js.UndefOr[String] = js.undefined): Unit = js.native
7547+
7548+
/**
7549+
* Creates a new inline group in the Web Console. Unlike console.group(), however,
7550+
* the new group is created collapsed. The user will need to use the disclosure
7551+
* button next to it to expand it, revealing the entries created in the group.
7552+
*
7553+
* Call console.groupEnd() to back out to the parent group.
7554+
*
7555+
* MDN
7556+
*/
7557+
def groupCollapsed(label: js.UndefOr[String] = js.undefined): Unit = js.native
7558+
7559+
/**
7560+
* Exits the current inline group in the Web Console.
7561+
*
7562+
* MDN
7563+
*/
7564+
def groupEnd(): Unit = js.native
74647565
}
74657566

74667567
@js.native

0 commit comments

Comments
 (0)