Conversation
aks-
commented
Oct 21, 2015
- added noop implementions of methods required as per below spec
- added aliases for common console methods
- https://github.com/DeveloperToolsWG/console-object/blob/master/api.md
|
Related: #1799 (comment) |
lib/console.js
Outdated
There was a problem hiding this comment.
Perhaps we can define a noop function once in the file, and then assign them all to it.
There was a problem hiding this comment.
+1 on defining a single noop function.
There was a problem hiding this comment.
aha, changed the assignments to noop
cfa5c51 to
51b8ef9
Compare
|
@aks- ... probably the next thing I'd say is that a note should be added to the docs that these are noops and while they are defined, they are not expected to actually do anything. |
|
@jasnell Hmm +1. I will add them tomorrow the first thing |
- this conforms to the following spec - https://github.com/DeveloperToolsWG/console-object/blob/master/api.md
- add common aliases as per following spec - https://github.com/DeveloperToolsWG/console-object/blob/master/api.md
51b8ef9 to
23cba06
Compare
|
This should probably be semver-major because it's going to break polyfills that do feature detection, e.g. if (!console.profile) polyfill();Stubbing methods is also something of a questionable practice IMO. If you're not supporting something, don't implement it. -1 from me although I don't feel really strongly about it. |
|
Strong -1 here, this would break feature detection as Ben mentions. We have #1799 which takes care of the group* methods, which I plan to land eventually. A noop isn't helping here, and these methods should be taken a look on a case-by-case basis, if something isn't feasable to do in a terminal, we should just throw imho. |
|
@silverwind If we aren't going to follow the console spec there is no reason to land features like |
|
@Fishrock123 I'm pretty sure the spec does not dictate to "implement" a noop. I'd certainly prefer to have unimplented stuff as |
|
Also -1 for adding a bunch of noops. Seems like it would be confusing for users to call functions and have nothing happen. |
|
-1 from me. |
|
I think we'd be fine with this PR if it's reduced to just adding the aliases. |
|
I have made a PR doing just that then #3486 And we can discuss it there. |
@silverwind If this doesn't mean implement no-ops, I don't know what it does mean? See the top of https://github.com/DeveloperToolsWG/console-object/blob/master/api.md |
|
And the message of the commit that introduced this sentence doesn't help much: |
|
cc @bkardell who appears to have written it. |
|
I don't think it means doing a noop, but aliasing to |
|
@silverwind not everything logs there, though. I.e. What should |
|
Also the signature in our doc doesn't follow the the signature given in console spec. We also have to change that? |
|
Given the -1's, the lack of activity, and precedence on similar PRs, closing this one. |