You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Originally, I thought console.countReset() should reset the 'default' label similar to how console.count() increments the 'default' counter. However, the w3c standard for console.countReset() demonstrates that calling console.countReset() after console.count("a label") will reset the "a label" label.
It still remains ambiguous whether the behavior for console.countReset() with no arguments is to reset the most recent label or reset all labels. Personally, it seems that resetting every label or resetting the default label (although it doesn't pass the w3c test) makes the most sense. Let me know what you all think.
The text was updated successfully, but these errors were encountered:
Your original thought is correct; countReset() should only reset the label default, or display a warning if a count with that label was never started. The test is wrong, thanks for catching this! Going to leave tis open until I take care of it. But yeah, per specification (see IDL for default label value), the label should default to default, and attempt to reset counts with that label.
Originally, I thought
console.countReset()
should reset the 'default' label similar to howconsole.count()
increments the 'default' counter. However, the w3c standard forconsole.countReset()
demonstrates that callingconsole.countReset()
afterconsole.count("a label")
will reset the "a label" label.It still remains ambiguous whether the behavior for
console.countReset()
with no arguments is to reset the most recent label or reset all labels. Personally, it seems that resetting every label or resetting the default label (although it doesn't pass the w3c test) makes the most sense. Let me know what you all think.The text was updated successfully, but these errors were encountered: