Add `console.timeStamp()` to the specification
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.
Ref: #140
- [x] At least two implementers are interested (and none opposed):
- Mozilla
- Apple
- [x] Implementations already exist:
- Chromium
- Gecko
- WebKit
- [x] MDN documentation already exists.
- [x] The top of this comment includes a clear commit message to use.
@domfarolino Let's get the ball rolling here. :muscle:
@and-oli Please loop in your contacts with other browser vendors here.
Hmm, it looks like you removed this line about tests from the pull request template? Can you add that back and maybe write some tests for this API? You can follow the pattern in https://github.com/web-platform-tests/wpt/tree/master/console. Note the state of testing is a little sad at this point, since these are basically just manual tests :(
@dcrousso @nchevobbe
Hmm, it looks like you removed this line about tests from the pull request template? Can you add that back and maybe write some tests for this API? You can follow the pattern in https://github.com/web-platform-tests/wpt/tree/master/console. Note the state of testing is a little sad at this point, since these are basically just manual tests :(
Beyond testing that the function exists on the console object, how would we go about adding other (meaningful) tests?
Hmm, it looks like you removed this line about tests from the pull request template? Can you add that back and maybe write some tests for this API? You can follow the pattern in https://github.com/web-platform-tests/wpt/tree/master/console. Note the state of testing is a little sad at this point, since these are basically just manual tests :(
Beyond testing that the function exists on the
consoleobject, how would we go about adding other (meaningful) tests?
@domfarolino any thoughts here?
Sadly I don't think we can do much more than add a few manual tests to WPT, and do whatever vendor-specific testing you can do. I think this PR is good to go % https://github.com/whatwg/console/pull/236/files#r1676151812. @bmeurer does Firefox match Chrome in this case? (I couldn't find where Firefox puts timeStamp() marks on its performance timeline). If it does match Chrome, we can just land this since it would match 2/3 implementations without strong objections from another.
@bmeurer does Firefox match Chrome in this case? (I couldn't find where Firefox puts timeStamp() marks on its performance timeline). If it does match Chrome, we can just land this since it would match 2/3 implementations without strong objections from another.
I've confirmed that Firefox removed UI support for this when they launched their new profiler but they used to support it. They still accept the API but currently don't use that information. Bug to add support here: https://bugzil.la/1730896
MDN updated here (with support from @canova from Firefox Profiler team): https://github.com/mdn/browser-compat-data/pull/28074
Not sure what that "half-support" in Firefox, and the small outstanding "default" issue in Safari means in terms of "2/3 implementations without strong objections from another" though? I'd argue it meets the bar and with some support in all three browsers it would be good to merge this and add it to the spec.