Skip to content

Proposal: logging methods should always be bound to console #27

@fitzgen

Description

@fitzgen
[1,2,3].forEach(console.log)

Expected Results:

logs 3 messages in the console

Actual Results:

Error: 'log' called on an object that does not implement interface Console.


This used to be the behavior in Firefox, but it recently broke. I've filed a bug to revert to the old behavior where the methods were always bound to console, but figured we should codify this behavior here too.

Its kind of masochistic to force developers to bind every time they pass console.log as an argument!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions