jenkins-bot has submitted this change and it was merged.

Change subject: ve.debug: Document why we use global 
Function#apply+Function#call instead of method.apply
......................................................................


ve.debug: Document why we use global Function#apply+Function#call instead of 
method.apply

Follows-up 2ad6577

Change-Id: I3e2cc39873bffd08b1404bd54dd392623092847d
---
M modules/ve/ve.debug.js
1 file changed, 3 insertions(+), 0 deletions(-)

Approvals:
  Catrope: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/modules/ve/ve.debug.js b/modules/ve/ve.debug.js
index 4e6145c..1ba2d73 100644
--- a/modules/ve/ve.debug.js
+++ b/modules/ve/ve.debug.js
@@ -27,6 +27,9 @@
  * @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 );
 };
 

-- 
To view, visit https://gerrit.wikimedia.org/r/65954
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I3e2cc39873bffd08b1404bd54dd392623092847d
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/extensions/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Krinkle <[email protected]>
Gerrit-Reviewer: Catrope <[email protected]>
Gerrit-Reviewer: Trevor Parscal <[email protected]>
Gerrit-Reviewer: jenkins-bot

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to