html.js 2.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  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/html",["./kernel","../dom","../dom-style","../dom-attr","../dom-prop","../dom-class","../dom-construct","../dom-geometry"],function(_1,_2,_3,_4,_5,_6,_7,_8){
  8. _1.byId=_2.byId;
  9. _1.isDescendant=_2.isDescendant;
  10. _1.setSelectable=_2.setSelectable;
  11. _1.getAttr=_4.get;
  12. _1.setAttr=_4.set;
  13. _1.hasAttr=_4.has;
  14. _1.removeAttr=_4.remove;
  15. _1.getNodeProp=_4.getNodeProp;
  16. _1.attr=function(_9,_a,_b){
  17. if(arguments.length==2){
  18. return _4[typeof _a=="string"?"get":"set"](_9,_a);
  19. }
  20. return _4.set(_9,_a,_b);
  21. };
  22. _1.hasClass=_6.contains;
  23. _1.addClass=_6.add;
  24. _1.removeClass=_6.remove;
  25. _1.toggleClass=_6.toggle;
  26. _1.replaceClass=_6.replace;
  27. _1._toDom=_1.toDom=_7.toDom;
  28. _1.place=_7.place;
  29. _1.create=_7.create;
  30. _1.empty=function(_c){
  31. _7.empty(_c);
  32. };
  33. _1._destroyElement=_1.destroy=function(_d){
  34. _7.destroy(_d);
  35. };
  36. _1._getPadExtents=_1.getPadExtents=_8.getPadExtents;
  37. _1._getBorderExtents=_1.getBorderExtents=_8.getBorderExtents;
  38. _1._getPadBorderExtents=_1.getPadBorderExtents=_8.getPadBorderExtents;
  39. _1._getMarginExtents=_1.getMarginExtents=_8.getMarginExtents;
  40. _1._getMarginSize=_1.getMarginSize=_8.getMarginSize;
  41. _1._getMarginBox=_1.getMarginBox=_8.getMarginBox;
  42. _1.setMarginBox=_8.setMarginBox;
  43. _1._getContentBox=_1.getContentBox=_8.getContentBox;
  44. _1.setContentSize=_8.setContentSize;
  45. _1._isBodyLtr=_1.isBodyLtr=_8.isBodyLtr;
  46. _1._docScroll=_1.docScroll=_8.docScroll;
  47. _1._getIeDocumentElementOffset=_1.getIeDocumentElementOffset=_8.getIeDocumentElementOffset;
  48. _1._fixIeBiDiScrollLeft=_1.fixIeBiDiScrollLeft=_8.fixIeBiDiScrollLeft;
  49. _1.position=_8.position;
  50. _1.marginBox=function marginBox(_e,_f){
  51. return _f?_8.setMarginBox(_e,_f):_8.getMarginBox(_e);
  52. };
  53. _1.contentBox=function contentBox(_10,box){
  54. return box?_8.setContentSize(_10,box):_8.getContentBox(_10);
  55. };
  56. _1.coords=function(_11,_12){
  57. _1.deprecated("dojo.coords()","Use dojo.position() or dojo.marginBox().");
  58. _11=_2.byId(_11);
  59. var s=_3.getComputedStyle(_11),mb=_8.getMarginBox(_11,s);
  60. var abs=_8.position(_11,_12);
  61. mb.x=abs.x;
  62. mb.y=abs.y;
  63. return mb;
  64. };
  65. _1.getProp=_5.get;
  66. _1.setProp=_5.set;
  67. _1.prop=function(_13,_14,_15){
  68. if(arguments.length==2){
  69. return _5[typeof _14=="string"?"get":"set"](_13,_14);
  70. }
  71. return _5.set(_13,_14,_15);
  72. };
  73. _1.getStyle=_3.get;
  74. _1.setStyle=_3.set;
  75. _1.getComputedStyle=_3.getComputedStyle;
  76. _1.__toPixelValue=_1.toPixelValue=_3.toPixelValue;
  77. _1.style=function(_16,_17,_18){
  78. switch(arguments.length){
  79. case 1:
  80. return _3.get(_16);
  81. case 2:
  82. return _3[typeof _17=="string"?"get":"set"](_16,_17);
  83. }
  84. return _3.set(_16,_17,_18);
  85. };
  86. return _1;
  87. });