Skip to content

Commit

Permalink
Add console.timeStamp() to the specification
Browse files Browse the repository at this point in the history
This adds a minimal (vague) definition for the `timeStamp()` method,
based on its current behavior across Chromium, Firefox, and Safari,
and the MDN documentation[^1].

[^1]: https://developer.mozilla.org/en-US/docs/Web/API/console/timestamp_static

Ref: #140
  • Loading branch information
bmeurer committed Jul 12, 2024
1 parent 7a9c402 commit 31280ac
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions index.bs
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ namespace console { // but see namespace object requirements below
undefined time(optional DOMString label = "default");
undefined timeLog(optional DOMString label = "default", any... data);
undefined timeEnd(optional DOMString label = "default");
undefined timeStamp(optional DOMString label = "default");
};
</pre>

Expand Down Expand Up @@ -274,6 +275,12 @@ for plans to make {{console/timeEnd()}} and {{console/timeLog()}} formally repor
console when a given |label| does not exist in the associated <a>timer table</a>.
</p>

<h4 id="timestamp" oldids="timestamp-label,dom-console-timestamp" method for="console">timeStamp(|label|)</h4>

1. If the developer is recording a performance trace, add a single marker to the performance trace with the |label|.
1. Otherwise, do nothing.
1. Return *undefined*.

<h2 id="supporting-ops">Supporting abstract operations</h2>

<h3 id="logger" abstract-op lt="Logger">Logger(|logLevel|, |args|)</h3>
Expand Down

0 comments on commit 31280ac

Please sign in to comment.