mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-09-27 12:16:51 +00:00
Merge "ve.debug: Document why we use global Function#apply+Function#call instead of method.apply"
This commit is contained in:
commit
85ac84d7bf
|
@ -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 );
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue