-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Removed console polyfills/shims #15881
Conversation
packages/ember-console/lib/index.js
Outdated
@@ -56,7 +22,7 @@ export default { | |||
@param {*} arguments | |||
@public | |||
*/ | |||
log: consoleMethod('log') || K, | |||
log: console.log, // eslint-disable-line no-console, no-undef |
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'm slightly torn here, I don't know if we can use console.log
unbound from console
for all supported platforms. Do you know?
The safe bet here is essentially to do:
log() { return console.log(...arguments); }
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.
Tried var log = console.log; log('foo');
in Safari, Firefox, Chrome and IE 11. Worked everywhere.
I can change it to be safe though.
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.
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.
@t-sauer - No rush here, just curious if you had time to review?
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 am on it right now. Seems like .bind(console)
is indeed needed in some cases.
a85fcb2
to
44339cf
Compare
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.
Thank you!
I think it is safe to add
console
of available globals in the ESLint config now that IE 9 support is removed, so I could also change that.