vendor/assets/javascripts/dojo/on.js in dojo-rails-0.11.0 vs vendor/assets/javascripts/dojo/on.js in dojo-rails-0.14.0
- old
+ new
@@ -1,7 +1,7 @@
/*
- Copyright (c) 2004-2011, The Dojo Foundation All Rights Reserved.
+ Copyright (c) 2004-2012, The Dojo Foundation All Rights Reserved.
Available via Academic Free License >= 2.1 OR the modified BSD license.
see: http://dojotoolkit.org/license for details
*/
//>>built
@@ -12,11 +12,11 @@
_3.add("jscript",_4&&(_4()+ScriptEngineMinorVersion()/10));
_3.add("event-orientationchange",_3("touch")&&!_3("android"));
_3.add("event-stopimmediatepropagation",window.Event&&!!window.Event.prototype&&!!window.Event.prototype.stopImmediatePropagation);
}
var on=function(_5,_6,_7,_8){
-if(_5.on&&typeof _6!="function"){
+if(typeof _5.on=="function"&&typeof _6!="function"&&!_5.nodeType){
return _5.on(_6,_7);
}
return on.parse(_5,_6,_7,_9,_8,this);
};
on.pausable=function(_a,_b,_c,_d){
@@ -157,13 +157,10 @@
};
};
}
if(_3("dom-addeventlistener")){
_28={focusin:"focus",focusout:"blur"};
-if(_3("opera")){
-_28.keydown="keypress";
-}
on.emit=function(_43,_44,_45){
if(_43.dispatchEvent&&document.createEvent){
var _46=_43.ownerDocument.createEvent("HTMLEvents");
_46.initEvent(_44,!!_45.bubbles,!!_45.cancelable);
for(var i in _45){
@@ -300,12 +297,19 @@
delete _5b.type;
}
catch(e){
}
if(_5b.type){
+if(_3("mozilla")){
+var _5c={};
+for(var _5e in _5b){
+_5c[_5e]=_5b[_5e];
+}
+}else{
_58.prototype=_5b;
var _5c=new _58;
+}
_5c.preventDefault=function(){
_5b.preventDefault();
};
_5c.stopPropagation=function(){
_5b.stopPropagation();
@@ -325,13 +329,13 @@
}
if(!("rotation" in _5c)){
_5c.rotation=0;
_5c.scale=1;
}
-var _5e=_5c.changedTouches[0];
-for(var i in _5e){
+var _5f=_5c.changedTouches[0];
+for(var i in _5f){
delete _5c[i];
-_5c[i]=_5e[i];
+_5c[i]=_5f[i];
}
}
return _5a.call(this,_5c);
};
};