Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 34.4k
console: Add common aliases for console methods#3486
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
Uh oh!
There was an error while loading. Please reload this page.
Conversation
aks- commented Oct 22, 2015
- add common aliases as per following spec
- https://github.com/DeveloperToolsWG/console-object/blob/master/api.md
doc/api/console.markdown Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suggest using the same signature as in the spec: console.debug(object [,object, ...]).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Then we might want to change the complete doc for console. Because the signature to methods like log are also not matching with spec we are following https://github.com/nodejs/node/blob/master/doc/api/console.markdown#consolelogdata- Do you think I should change them as well?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I think changing the signatures to match the spec would be preferred. Can you do so in a second commit?
silverwind commented Oct 22, 2015
Please also add some tests for these methods here. |
jasnell commented Oct 22, 2015
Wouldn't this need to be |
silverwind commented Oct 22, 2015
I don't think we have to support broken polyfills or monkey patches, and I think it's unlikely anyone would do so in the case of these methods. |
aredridel commented Oct 25, 2015
Hm. on the converse side, this lets things designed for the browser run as is, even if they use these features. |
chrisdickinson commented Oct 25, 2015
It seems low risk. If code is monkeypatching the |
b26facc to ae36937Compareaks- commented Oct 29, 2015
@silverwind I have added the tests for this and changed the signture of newly added aliases as per browser spec. Besides that I created a new PR #3584 in which I changed the method signatures which were there previously in doc to follow the browser spec. I haven't changed the signatures of methods which have differnent behaviour in node than in browser (e.g. console.assert). Now I am in confusion if we are actually following the spec? |
silverwind commented Oct 29, 2015
@aks- thanks, I'll have a look later. This PR is LGTM. |
silverwind commented Oct 29, 2015
@aks- on second look, what's up with |
- add common aliases as per following spec - https://github.com/DeveloperToolsWG/console-object/blob/master/api.md
ae36937 to 16641f7Compareaks- commented Oct 30, 2015
@silverwind sorry I added that by accident I guess...removed it now |
silverwind commented Nov 3, 2015
silverwind commented Nov 3, 2015
LGTM, will likely land this tomorrow. |
Fishrock123 commented Nov 3, 2015
I'm not sure this is a good idea actually if we aren't going to follow the rest of the "spec". @aks- Sorry, my fault for pulling you into this console-spec thing. :/ |
silverwind commented Nov 3, 2015
@Fishrock123 I think we should implement as much of this "spec" as is feasible. What's wrong with these alias methods? |
Fishrock123 commented Nov 3, 2015
Nothing particularly but it's more things we need to keep supporting. Seems low-value -- stuff works fine if it follows this part but not another part kind of thing. |
aks- commented Nov 4, 2015
@Fishrock123 it's okay, I am actually learning a lot about the structure of node codebase :) |
silverwind commented Nov 4, 2015
Guess I'll put this on hold then. Interestingly, MDN says |
Fishrock123 commented Nov 4, 2015
See #3584 (comment), the situation is generally very silly. |
jasnell commented Mar 22, 2016
Closing due to lack of activity. Seems like there's very little interest in this in general. |