-
Notifications
You must be signed in to change notification settings - Fork 70
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add console.countReset? #89
Comments
I'm assuming we need some more interest since Edge is the only implementer of this if I'm not mistaken? @JosephPecoraro what do you think about possibly implementing this? And as far as behavior goes, what should
I can see either being valid, but I lean toward the first? |
Just to weigh in here, this would be tremendously useful for Node.js if we were to land the implementation of |
@domfarolino ... in edge, |
FYI: in current Chrome implementation, console.clear clears all stored messages from internal storage including any counters or timers. |
Oh interesting; we should investigate if other browsers do that, and if so, include it in the spec. |
@ak239 ... is that a recent fix in Chrome? I just tested locally and as of |
@jasnell please check Canary. I think it was regressed a long time ago and we just fixed it back, we can revert this change but it looks good to me. |
Ok, if the spec is updated to have |
Firefox doesn't cancel timers nor counts. To me console.clear() should just about cleaning console messages. I prefer console.countReset(optional DOMString label = "default"); |
Node.js does implement |
Thanks @fmartin5. Looks like we should spec it then, I'm in favor of this, with default behavior being the same as I think the issue of |
Thanks all! The standard has now been updated with this method :) |
For the record, this is now implemented in Firefox 62.0a1 (2018-05-25) |
Edge has a method
console.countReset(label)
which allows resetting a counter. This seems useful, and in general it's better to add console methods than remove them, in my opinion.If we spec this we should make sure that its behavior with no arguments, or undefined, is the same as that is decided for
console.count()
. (For that, see #88.)The text was updated successfully, but these errors were encountered: