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

Removed console polyfills/shims #15881

Merged
merged 1 commit into from
Dec 6, 2017

Conversation

t-sauer
Copy link
Contributor

@t-sauer t-sauer commented Nov 29, 2017

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.

@@ -56,7 +22,7 @@ export default {
@param {*} arguments
@public
*/
log: consoleMethod('log') || K,
log: console.log, // eslint-disable-line no-console, no-undef
Copy link
Member

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); }

Copy link
Contributor Author

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.

Copy link
Member

Choose a reason for hiding this comment

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

Checkout this MS Edge screenshot:

MS Edge failure

I think this is for console.debug?

Copy link
Member

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?

Copy link
Contributor Author

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.

@rwjblue rwjblue mentioned this pull request Nov 29, 2017
34 tasks
Copy link
Member

@rwjblue rwjblue left a comment

Choose a reason for hiding this comment

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

Thank you!

@rwjblue rwjblue merged commit ad2fc05 into emberjs:master Dec 6, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants