From 701ac40e69e3338a42baf82f2e6613d6d36c403a Mon Sep 17 00:00:00 2001 From: Timo Tijhof Date: Wed, 29 May 2013 11:29:37 +0100 Subject: [PATCH] ve.debug: Document why we use global Function#apply+Function#call instead of method.apply Follows-up 2ad6577 Change-Id: I3e2cc39873bffd08b1404bd54dd392623092847d --- modules/ve/ve.debug.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/modules/ve/ve.debug.js b/modules/ve/ve.debug.js index 4e6145c61f..1ba2d734d1 100644 --- a/modules/ve/ve.debug.js +++ b/modules/ve/ve.debug.js @@ -27,6 +27,9 @@ ve.debug = true; * @param {Mixed...} [data] Data to log */ ve.log = function () { + // In IE9 console methods are not real functions and as such do not inherit + // from Function.prototype, thus console.log.apply does not exist. + // However it is function-like enough that passing it to Function#apply does work. Function.prototype.apply.call( console.log, console, arguments ); };