event.js 795 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. /*
  2. Copyright (c) 2004-2011, The Dojo Foundation All Rights Reserved.
  3. Available via Academic Free License >= 2.1 OR the modified BSD license.
  4. see: http://dojotoolkit.org/license for details
  5. */
  6. //>>built
  7. define("dojo/_base/event",["./kernel","../on","../has","../dom-geometry"],function(_1,on,_2,_3){
  8. if(on._fixEvent){
  9. var _4=on._fixEvent;
  10. on._fixEvent=function(_5,se){
  11. _5=_4(_5,se);
  12. if(_5){
  13. _3.normalizeEvent(_5);
  14. }
  15. return _5;
  16. };
  17. }
  18. var _6={fix:function(_7,_8){
  19. if(on._fixEvent){
  20. return on._fixEvent(_7,_8);
  21. }
  22. return _7;
  23. },stop:function(_9){
  24. if(_2("dom-addeventlistener")||(_9&&_9.preventDefault)){
  25. _9.preventDefault();
  26. _9.stopPropagation();
  27. }else{
  28. _9=_9||window.event;
  29. _9.cancelBubble=true;
  30. on._preventDefault.call(_9);
  31. }
  32. }};
  33. if(1){
  34. _1.fixEvent=_6.fix;
  35. _1.stopEvent=_6.stop;
  36. }
  37. return _6;
  38. });