console functions don't inherit from Function.prototype

Issue #14516873 • Assigned to Steven K.

Details

Author
Todd K.
Created
Nov 3, 2017
Privacy
This issue is public.
Found in
  • Microsoft Edge
Reports
Reported by 1 person

Sign in to watch or report this issue.

Steps to reproduce

  1. Open developer tools
  2. Type: console.log.apply(console, ['this', 'should', 'work'])
  3. Observe that you get an error
  4. (Observed in https://github.com/choojs/nanologger/pull/8)

The only work around is this monstrosity:

Function.prototype.apply.apply(console.log, [console, args])

Attachments

0 attachments

    Comments and activity

    You need to sign in to your Microsoft account to add a comment.

    Sign in