Path: blob/trunk/third_party/closure/goog/net/xhrlike.js
2868 views
// Copyright 2013 The Closure Library Authors. All Rights Reserved.1//2// Licensed under the Apache License, Version 2.0 (the "License");3// you may not use this file except in compliance with the License.4// You may obtain a copy of the License at5//6// http://www.apache.org/licenses/LICENSE-2.07//8// Unless required by applicable law or agreed to in writing, software9// distributed under the License is distributed on an "AS-IS" BASIS,10// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.11// See the License for the specific language governing permissions and12// limitations under the License.1314goog.provide('goog.net.XhrLike');15161718/**19* Interface for the common parts of XMLHttpRequest.20*21* Mostly copied from externs/w3c_xml.js.22*23* @interface24* @see http://www.w3.org/TR/XMLHttpRequest/25*/26goog.net.XhrLike = function() {};272829/**30* Typedef that refers to either native or custom-implemented XHR objects.31* @typedef {!goog.net.XhrLike|!XMLHttpRequest}32*/33goog.net.XhrLike.OrNative;343536/**37* @type {function()|null|undefined}38* @see http://www.w3.org/TR/XMLHttpRequest/#handler-xhr-onreadystatechange39*/40goog.net.XhrLike.prototype.onreadystatechange;414243/**44* @type {string}45* @see http://www.w3.org/TR/XMLHttpRequest/#the-responsetext-attribute46*/47goog.net.XhrLike.prototype.responseText;484950/**51* @type {Document}52* @see http://www.w3.org/TR/XMLHttpRequest/#the-responsexml-attribute53*/54goog.net.XhrLike.prototype.responseXML;555657/**58* @type {number}59* @see http://www.w3.org/TR/XMLHttpRequest/#readystate60*/61goog.net.XhrLike.prototype.readyState;626364/**65* @type {number}66* @see http://www.w3.org/TR/XMLHttpRequest/#status67*/68goog.net.XhrLike.prototype.status;697071/**72* @type {string}73* @see http://www.w3.org/TR/XMLHttpRequest/#statustext74*/75goog.net.XhrLike.prototype.statusText;767778/**79* @param {string} method80* @param {string} url81* @param {?boolean=} opt_async82* @param {?string=} opt_user83* @param {?string=} opt_password84* @see http://www.w3.org/TR/XMLHttpRequest/#the-open()-method85*/86goog.net.XhrLike.prototype.open = function(87method, url, opt_async, opt_user, opt_password) {};888990/**91* @param {ArrayBuffer|ArrayBufferView|Blob|Document|FormData|string=} opt_data92* @see http://www.w3.org/TR/XMLHttpRequest/#the-send()-method93*/94goog.net.XhrLike.prototype.send = function(opt_data) {};959697/**98* @see http://www.w3.org/TR/XMLHttpRequest/#the-abort()-method99*/100goog.net.XhrLike.prototype.abort = function() {};101102103/**104* @param {string} header105* @param {string} value106* @see http://www.w3.org/TR/XMLHttpRequest/#the-setrequestheader()-method107*/108goog.net.XhrLike.prototype.setRequestHeader = function(header, value) {};109110111/**112* @param {string} header113* @return {string}114* @see http://www.w3.org/TR/XMLHttpRequest/#the-getresponseheader()-method115*/116goog.net.XhrLike.prototype.getResponseHeader = function(header) {};117118119/**120* @return {string}121* @see http://www.w3.org/TR/XMLHttpRequest/#the-getallresponseheaders()-method122*/123goog.net.XhrLike.prototype.getAllResponseHeaders = function() {};124125126