[Webkit-unassigned] [Bug 20141] Cannot call pointer to function console.log

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sat Apr 13 17:39:55 PDT 2013


https://bugs.webkit.org/show_bug.cgi?id=20141





--- Comment #28 from Glenn Maynard <glenn at zewt.org>  2013-04-13 17:38:10 PST ---
Note that if we want console.log, etc., to act like they're pre-bound (as if you did "console.log = console.log.bind(this)", then it doesn't look like this is the right patch.  This patch is described as making console.log a static function, which is quite different and means the logging functions can no longer go to the console for the window they're invoked on.

I don't know of any WebIDL feature that describes "prebinding", but I don't think this is LenientThis.

(In reply to comment #26)
> "document.querySelector('#id').oncompositionupdate = console.log"

Saving people 14 characters of typing--".bind(console)"--isn't a good reason.  There are lots of things that slow down development, but this isn't one of them.

> Host objects returning "unknown" typeof in IE and blowing up on simple property access — that was weird. And even that was allowed by the spec.

The inconsistencies and weirdnesses already in the platform should never be used as an argument to add more of them.

(In reply to comment #24)
> FWIW, both Firefox and Opera make it bound. IE10 doesn't. So that makes it 2-vs-2, and — once Opera switches to webkit — 3-vs-1.

(2 vs. 1, actually--Opera won't count as a separate browser any more than Chrome does.)

IE9 did what Firefox does, and if that hadn't changed I'd probably agree that WebKit should just follow suit for the sake of interop, but IE10 matches WebKit.  With the current versions of IE and WebKit agreeing on behavior here, hopefully Firefox will change to match.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.


More information about the webkit-unassigned mailing list