| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
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.
Sorry, something went wrong.
There was a problem hiding this comment.
+1 on defining a single noop function.
Sorry, something went wrong.
There was a problem hiding this comment.
+1 to that too
Sorry, something went wrong.
There was a problem hiding this comment.
aha, changed the assignments to noop
Sorry, something went wrong.
|
@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. |
Sorry, something went wrong.
|
@jasnell Hmm +1. I will add them tomorrow the first thing |
Sorry, something went wrong.
- 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
|
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. |
Sorry, something went wrong.
|
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. |
Sorry, something went wrong.
|
@silverwind If we aren't going to follow the console spec there is no reason to land features like console.group() though. Then those belong in user-land. |
Sorry, something went wrong.
|
@Fishrock123 I'm pretty sure the spec does not dictate to "implement" a noop. I'd certainly prefer to have unimplented stuff as undefined, which is also the strategy browsers follow regarding new API. |
Sorry, something went wrong.
|
Also -1 for adding a bunch of noops. Seems like it would be confusing for users to call functions and have nothing happen. |
Sorry, something went wrong.
|
-1 from me. |
Sorry, something went wrong.
|
I think we'd be fine with this PR if it's reduced to just adding the aliases. |
Sorry, something went wrong.
|
I have made a PR doing just that then #3486 And we can discuss it there. |
Sorry, something went wrong.
@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 |
Sorry, something went wrong.
|
And the message of the commit that introduced this sentence doesn't help much: |
Sorry, something went wrong.
|
cc @bkardell who appears to have written it. |
Sorry, something went wrong.
|
I don't think it means doing a noop, but aliasing to console.log. |
Sorry, something went wrong.
|
@silverwind not everything logs there, though. I.e. What should console.clear() do in that case? |
Sorry, something went wrong.
|
Also the signature in our doc doesn't follow the the signature given in console spec. We also have to change that? |
Sorry, something went wrong.
|
Given the -1's, the lack of activity, and precedence on similar PRs, closing this one. |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.