W3C home > Mailing lists > Public > public-script-coord@w3.org > January to March 2013

RE: Standardizing console APIs: Where?

From: Domenic Denicola <domenic@domenicdenicola.com>
Date: Tue, 26 Feb 2013 06:28:26 +0000
To: Marcos Caceres <w3c@marcosc.com>, Brian Kardell <bkardell@gmail.com>, "Hill, Clint" <Clint.Hill@goaaa.com>
CC: "public-script-coord@w3.org" <public-script-coord@w3.org>
Message-ID: <B4AE8F4E86E26C47AC407D49872F6F9F61F85662@BY2PRD0510MB354.namprd05.prod.outlook.com>
On Monday, February 25, 2013 at 09:54, Marcos Caceres wrote:

> _However_, if evidence of interoperability issues can be presented, and those are causing developer pain, then that makes for a stronger case for standardisation.

One case of pain I've seen is that in some browsers, `console.log` is bound to `console` (Firefox and Node.js, that I know of). Whereas in others, it is not (Chrome, that I know of).

The former behavior is much more convenient, and allows writing code like `array.forEach(console.log)`. However, such code is not portable across runtimes, as in the ones without a bound `console.log`, it fails with some cryptic error message.

Standardizing on bound versions of the functions would be nice!
Received on Tuesday, 26 February 2013 06:28:57 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 8 May 2013 19:30:09 UTC