AJAX.js 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115
  1. /**
  2. @param {string} [sName]
  3. @param {string} [location]
  4. @return {XMLHttpRequest}
  5. */
  6. ActiveXObject = function(sName,location) {};
  7. /**
  8. @static
  9. @type {number}
  10. @const
  11. */
  12. XMLHttpRequest.UNSENT = 0;
  13. /**
  14. @static
  15. @type {number}
  16. @const
  17. */
  18. XMLHttpRequest.OPENED = 1;
  19. /**
  20. @static
  21. @type {number}
  22. @const
  23. */
  24. XMLHttpRequest.HEADERS_RECEIVED = 2;
  25. /**
  26. @static
  27. @type {number}
  28. @const
  29. */
  30. XMLHttpRequest.LOADING = 3;
  31. /**
  32. @static
  33. @type {number}
  34. @const
  35. */
  36. XMLHttpRequest.DONE = 4;
  37. /**
  38. @type {Function}
  39. */
  40. Object.defineProperty(XMLHttpRequest, "onreadystatechange", { set: function(value) {} });
  41. /**
  42. @type {number}
  43. */
  44. XMLHttpRequest.prototype.readyState = 0;
  45. /**
  46. @type {string}
  47. @const
  48. */
  49. XMLHttpRequest.prototype.responseText = null;
  50. /**
  51. @type {string}
  52. @const
  53. */
  54. XMLHttpRequest.prototype.statusText = null;
  55. /**
  56. @type {number}
  57. @const
  58. */
  59. XMLHttpRequest.prototype.status = 0;
  60. /**
  61. @type {Document}
  62. */
  63. XMLHttpRequest.prototype.responseXML = 0;
  64. /**
  65. @param {...Object} [options]
  66. @constructor
  67. */
  68. function XMLHttpRequest(options) {}
  69. XMLHttpRequest.prototype.abort = function() {};
  70. /**
  71. @return {string}
  72. */
  73. XMLHttpRequest.prototype.getAllResponseHeaders = function() {};
  74. /**
  75. @param {string} headerName
  76. @return {string}
  77. */
  78. XMLHttpRequest.prototype.getResponseHeader = function(headerName) {};
  79. /**
  80. @param {string} method
  81. @param {string} url
  82. @param {boolean} [async]
  83. @param {string} [user]
  84. @param {string} [password]
  85. */
  86. XMLHttpRequest.prototype.open = function(method,url,async,user,password) {};
  87. /**
  88. @param {String|ArrayBuffer|Blob|Document|FormData} [data]
  89. */
  90. XMLHttpRequest.prototype.send = function(data) {};
  91. /**
  92. @param {string} header
  93. @param {string} value
  94. */
  95. XMLHttpRequest.prototype.setRequestHeader = function(header,value) {};
  96. /**
  97. @static
  98. @type {number}
  99. @const
  100. */
  101. XMLHttpRequestException.NETWORK_ERR = 101;
  102. /**
  103. @static
  104. @type {number}
  105. @const
  106. */
  107. XMLHttpRequestException.ABORT_ERR = 102;
  108. /**
  109. @type {number}
  110. @const
  111. */
  112. XMLHttpRequestException.prototype.code = 0;
  113. XMLHttpRequestException = {};