[Pkg-javascript-commits] [dojo] 13/88: If there's an DOMNode with id="on", don't get confused into thinking that window.on() is a function you can call. Fixes #15888, refs #15871 on 1.8 branch !strict.

David Prévot taffit at moszumanska.debian.org
Thu Aug 21 17:39:31 UTC 2014


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

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

commit 37dcd66e5d1b143cf4e66d3880e567e5f3ae3021
Author: Bill Keese <bill at dojotoolkit.org>
Date:   Fri Aug 24 03:29:06 2012 +0000

    If there's an DOMNode with id="on", don't get confused into thinking that window.on() is a function you can call.      Fixes #15888, refs #15871 on 1.8 branch !strict.
    
    git-svn-id: http://svn.dojotoolkit.org/src/branches/1.8/dojo@29540 560b804f-0ae3-0310-86f3-f6aa0a117693
---
 on.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/on.js b/on.js
index 66022a5..def3193 100644
--- a/on.js
+++ b/on.js
@@ -39,7 +39,7 @@ define(["./has!dom-addeventlistener?:./aspect", "./_base/kernel", "./has"], func
 		//		|	obj.onfoo({key:"value"});
 		//		If you use on.emit on a DOM node, it will use native event dispatching when possible.
 
-		if(target.on && typeof type != "function"){ 
+		if(typeof target.on == "function" && typeof type != "function"){
 			// delegate to the target's on() method, so it can handle it's own listening if it wants
 			return target.on(type, listener);
 		}

-- 
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