[webkit-dev] On adding 'console.memory' API (and about the whole 'console' object.)

Geoffrey Garen ggaren at apple.com
Fri May 28 11:12:46 PDT 2010


Howdy.

> As Sam points out, this change may be fine, but he suggests to make it
> accessible only when a browser runs in a special "developer" mode.
> This can also be applied to the whole 'console' object.

It may be bad for web compatibility to hide the console object completely when the user does not have developer tools enabled. Sometimes web developers forget to take out their debugging code, and lack of the console object can cause an exception to be thrown.

Perhaps a better option would be to short-circuit all of the console object's APIs to be present but do nothing when the user does not have developer tools enabled.

Geoff


More information about the webkit-dev mailing list