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

David Prévot taffit at moszumanska.debian.org
Thu Mar 24 04:28:28 UTC 2016


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

taffit pushed a commit to annotated tag 1.10.5
in repository dojo.

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

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

diff --git a/_base/kernel.js b/_base/kernel.js
index 2fb25c7..7375573 100644
--- a/_base/kernel.js
+++ b/_base/kernel.js
@@ -155,7 +155,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",
@@ -175,6 +177,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