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

console: change doc to follow major browser console doc #3584

Conversation

aks-
Copy link
Member

@aks- aks- commented Oct 29, 2015

@Trott Trott added the console Issues and PRs related to the console subsystem. label Oct 29, 2015
@@ -72,15 +72,15 @@ object. This is useful for inspecting large complicated objects. Defaults to
- `colors` - if `true`, then the output will be styled with ANSI color codes.
Defaults to `false`. Colors are customizable, see below.

### console.time(timerName)
### console.time(label)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We recently changed this in #3166 to match MDN. I'd say we ought to try changing the spec (which is linked on MDN, ironically).

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

According to MDN history, it's called timerName on there since 2012 when that article was created, thought calling it label seems somewhat common too.

If we agree on calling it label, I can change it on MDN, supposedly.

cc: @targos

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@silverwind I don't really care. I changed it after your suggestion.
If you want to change it back, just run git revert 8c043c1

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, revert filed in #3590. I'm sorry for the trouble I've caused.

@aks- could you leave this rename of that argument out of this PR?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@silverwind done.

@aks- aks- force-pushed the change-doc-to-follow-major-browser-console-API branch from 8215ae2 to d48a9c3 Compare October 30, 2015 05:54
@silverwind
Copy link
Contributor

LGTM

@@ -32,7 +32,7 @@ In daily use, the blocking/non-blocking dichotomy is not something you
should worry about unless you log huge amounts of data.


### console.log([data][, ...])
### console.log(object [, object, ...])
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The first argument is optional too. You can call console.log() to print a blank line.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've tested this before, Node and Firefox print an empty line, Chrome does not. Maybe it should be brought up with the spec authors?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Meh, what actually matters here is what Node does.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be console.log([object, ...]), I think.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Or console.log([object [, ...]]) ?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@silverwind
Copy link
Contributor

@Fishrock123 agree, this isn't correctly documenting how it currently works in node. I filed DeveloperToolsWG/console-object#36 to hopefully clarify what the expected behaviour is.

@domenic
Copy link
Contributor

domenic commented Oct 30, 2015

That "spec" is a reasonable attempt but not really anything normative. I would not base anything on it. Console behaviour is not really interoperable.

@Fishrock123
Copy link
Contributor

@domenic are you saying that our console shouldn't try to be similar to a browser console?

@domenic
Copy link
Contributor

domenic commented Nov 4, 2015

It definitely should. But that document and browser console behavior are unrelated. And browsers don't really agree on console behavior in various ways.

@jasnell jasnell added the stalled Issues and PRs that are stalled. label Mar 22, 2016
@jasnell
Copy link
Member

jasnell commented Mar 22, 2016

Marked as stalled. Will close if there's no new activity in the next few weeks.

@jasnell
Copy link
Member

jasnell commented Apr 12, 2016

Closing due to further lack of activity. This might still be worthwhile, however, so can definitely reopen if necessary.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
console Issues and PRs related to the console subsystem. stalled Issues and PRs that are stalled.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

8 participants