29 Oct
2010
29 Oct
'10
8:02 a.m.
+1, but out of curiosity.. On 10/28/2010 08:34 PM, Jerome Velociter wrote:
Hi devs,
I'd like to commit a console.log wrapper in xwiki.js that does some checking before logging, in the spirit of http://paulirish.com/2009/log-a-lightweight-wrapper-for-consolelog/
Something like :
var XWiki = {
//snip
/** * console#log wrapper for your developer own convenience */ log: function(){ if(typeof console != "undefined"){
console.log( Array.prototype.slice.call(arguments) );
What's the point of Array.prototype.slice.call(arguments) ? Thanks, Marius
} },
// snip
}
WDYT ?
Jerome _______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs