Skip to content

Commit edacb63

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

File tree

1 file changed

+103
-0
lines changed

1 file changed

+103
-0
lines changed

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

Lines changed: 103 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,100 @@ 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[_],
7498+
columns: js.UndefOr[Int] = js.undefined): Unit = js.native
7499+
7500+
/**
7501+
* Outputs a stack trace to the Web Console.
7502+
*
7503+
* MDN
7504+
*/
7505+
def trace(): Unit = js.native
7506+
74637507
def profileEnd(): Unit = js.native
7508+
7509+
/**
7510+
* Starts a timer you can use to track how long an operation takes.
7511+
* You give each timer a unique name, and may have up to 10,000 timers running on a given page.
7512+
* When you call console.timeEnd() with the same name, the browser will output the time,
7513+
* in milliseconds, that elapsed since the timer was started.
7514+
*
7515+
* MDN
7516+
*/
7517+
def time(label: String): Unit = js.native
7518+
7519+
/**
7520+
* Stops a timer that was previously started by calling console.time().
7521+
*
7522+
* MDN
7523+
*/
7524+
def timeEnd(label: String): Unit = js.native
7525+
7526+
/**
7527+
* Logs the number of times that this particular call to count() has been called.
7528+
* This function takes an optional argument label.
7529+
*
7530+
* MDN
7531+
*/
7532+
def count(label: String = "default"): Unit = js.native
7533+
7534+
/**
7535+
* Resets the counter. This function takes an optional argument label.
7536+
*
7537+
* MDN
7538+
*/
7539+
def countReset(label: String = "default"): Unit = js.native
7540+
7541+
/**
7542+
* Creates a new inline group in the Web Console log. This indents following
7543+
* console messages by an additional level, until console.groupEnd() is called.
7544+
*
7545+
* MDN
7546+
*/
7547+
def group(label: js.UndefOr[String] = js.undefined): Unit = js.native
7548+
7549+
/**
7550+
* Creates a new inline group in the Web Console. Unlike console.group(), however,
7551+
* the new group is created collapsed. The user will need to use the disclosure
7552+
* button next to it to expand it, revealing the entries created in the group.
7553+
*
7554+
* Call console.groupEnd() to back out to the parent group.
7555+
*
7556+
* MDN
7557+
*/
7558+
def groupCollapsed(
7559+
label: js.UndefOr[String] = js.undefined): Unit = js.native
7560+
7561+
/**
7562+
* Exits the current inline group in the Web Console.
7563+
*
7564+
* MDN
7565+
*/
7566+
def groupEnd(): Unit = js.native
74647567
}
74657568

74667569
@js.native

0 commit comments

Comments
 (0)