Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
seleniumhq
GitHub Repository: seleniumhq/selenium
Path: blob/trunk/third_party/closure/goog/net/xhrlike.js
4500 views
1
/**
2
* @license
3
* Copyright The Closure Library Authors.
4
* SPDX-License-Identifier: Apache-2.0
5
*/
6
7
goog.provide('goog.net.XhrLike');
8
9
10
11
/**
12
* Interface for the common parts of XMLHttpRequest.
13
*
14
* Mostly copied from externs/w3c_xml.js.
15
*
16
* @interface
17
* @see http://www.w3.org/TR/XMLHttpRequest/
18
*/
19
goog.net.XhrLike = function() {};
20
21
22
/**
23
* Typedef that refers to either native or custom-implemented XHR objects.
24
* @typedef {!goog.net.XhrLike|!XMLHttpRequest}
25
*/
26
goog.net.XhrLike.OrNative;
27
28
29
/**
30
* @type {function()|null|undefined}
31
* @see http://www.w3.org/TR/XMLHttpRequest/#handler-xhr-onreadystatechange
32
*/
33
goog.net.XhrLike.prototype.onreadystatechange;
34
35
36
/**
37
* @type {?ArrayBuffer|?Blob|?Document|?Object|?string}
38
* @see https://xhr.spec.whatwg.org/#response-object
39
*/
40
goog.net.XhrLike.prototype.response;
41
42
43
/**
44
* @type {string}
45
* @see http://www.w3.org/TR/XMLHttpRequest/#the-responsetext-attribute
46
*/
47
goog.net.XhrLike.prototype.responseText;
48
49
50
/**
51
* @type {string}
52
* @see https://xhr.spec.whatwg.org/#the-responsetype-attribute
53
*/
54
goog.net.XhrLike.prototype.responseType;
55
56
57
/**
58
* @type {Document}
59
* @see http://www.w3.org/TR/XMLHttpRequest/#the-responsexml-attribute
60
*/
61
goog.net.XhrLike.prototype.responseXML;
62
63
64
/**
65
* @type {number}
66
* @see http://www.w3.org/TR/XMLHttpRequest/#readystate
67
*/
68
goog.net.XhrLike.prototype.readyState;
69
70
71
/**
72
* @type {number}
73
* @see http://www.w3.org/TR/XMLHttpRequest/#status
74
*/
75
goog.net.XhrLike.prototype.status;
76
77
78
/**
79
* @type {string}
80
* @see http://www.w3.org/TR/XMLHttpRequest/#statustext
81
*/
82
goog.net.XhrLike.prototype.statusText;
83
84
85
/**
86
* @param {string} method
87
* @param {string} url
88
* @param {?boolean=} opt_async
89
* @param {?string=} opt_user
90
* @param {?string=} opt_password
91
* @see http://www.w3.org/TR/XMLHttpRequest/#the-open()-method
92
*/
93
goog.net.XhrLike.prototype.open = function(
94
method, url, opt_async, opt_user, opt_password) {};
95
96
97
/**
98
* @param {ArrayBuffer|ArrayBufferView|Blob|Document|FormData|string=} opt_data
99
* @see http://www.w3.org/TR/XMLHttpRequest/#the-send()-method
100
*/
101
goog.net.XhrLike.prototype.send = function(opt_data) {};
102
103
104
/**
105
* @see http://www.w3.org/TR/XMLHttpRequest/#the-abort()-method
106
*/
107
goog.net.XhrLike.prototype.abort = function() {};
108
109
110
/**
111
* @param {string} header
112
* @param {string} value
113
* @see http://www.w3.org/TR/XMLHttpRequest/#the-setrequestheader()-method
114
*/
115
goog.net.XhrLike.prototype.setRequestHeader = function(header, value) {};
116
117
118
/**
119
* @param {string} header
120
* @return {?string}
121
* @see http://www.w3.org/TR/XMLHttpRequest/#the-getresponseheader()-method
122
*/
123
goog.net.XhrLike.prototype.getResponseHeader = function(header) {};
124
125
126
/**
127
* @return {string}
128
* @see http://www.w3.org/TR/XMLHttpRequest/#the-getallresponseheaders()-method
129
*/
130
goog.net.XhrLike.prototype.getAllResponseHeaders = function() {};
131
132
/**
133
* @type {?function(!TrustTokenAttributeType): void | undefined}
134
* @see https://docs.google.com/document/d/1qUjtKgA7nMv9YGMhi0xWKEojkSITKzGLdIcZgoz6ZkI.
135
*/
136
goog.net.XhrLike.prototype.setTrustToken = function(trustTokenAttribute) {};
137
138