[Pkg-javascript-commits] [dojo] 116/149: fixes #18197, IE9 console quirks

David Prévot taffit at moszumanska.debian.org
Sat Feb 27 03:13:54 UTC 2016


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to branch master
in repository dojo.

commit b5f9a854ae246732d7070ead184a73b5ae7fa03d
Author: Dylan Schiemann <dylan at dojotoolkit.org>
Date:   Wed Dec 30 05:30:10 2015 -0700

    fixes #18197, IE9 console quirks
---
 _base/kernel.js | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/_base/kernel.js b/_base/kernel.js
index 58c26c4..2cd70a4 100644
--- a/_base/kernel.js
+++ b/_base/kernel.js
@@ -156,7 +156,9 @@ define(["../has", "./config", "require", "module"], function(has, config, requir
 	}
 
 	if(has("dojo-guarantee-console")){
-		typeof console != "undefined" || (console = {});
+		// IE 9 bug: https://bugs.dojotoolkit.org/ticket/18197
+		has.add("console-as-object", Function.prototype.bind && console && typeof console.log === "object");
+		typeof console != "undefined" || (console = {});  // intentional assignment
 		//	Be careful to leave 'log' always at the end
 		var cn = [
 			"assert", "count", "debug", "dir", "dirxml", "error", "group",
@@ -176,6 +178,8 @@ define(["../has", "./config", "require", "module"], function(has, config, requir
 					} : function(){};
 					console[tcn]._fake = true;
 				})();
+			}else if(has("console-as-object")){
+				console[tn] = Function.prototype.bind.call(console[tn], console);
 			}
 		}
 	}

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/dojo.git



More information about the Pkg-javascript-commits mailing list