Skip to content
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

Behavior of console.countReset with no arguments is ambiguous #143

Open
mliao95 opened this issue Jun 5, 2018 · 1 comment
Open

Behavior of console.countReset with no arguments is ambiguous #143

mliao95 opened this issue Jun 5, 2018 · 1 comment
Assignees

Comments

@mliao95
Copy link

mliao95 commented Jun 5, 2018

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.

@domfarolino domfarolino self-assigned this Jun 5, 2018
@domfarolino
Copy link
Member

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants