xhr.js
2.68 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
/*******************************************************************************
* Copyright (c) 2009, 2011 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* IBM Corporation - initial API and implementation
******************************************************************************
*
* Based on information from https://developer.mozilla.org/En/XMLHttpRequest
* and http://msdn2.microsoft.com/en-us/library/ms533062.aspx
**/
/**
* function createRequest
* @type XMLHttpRequest
* @memberOf Window
*/
Window.prototype.createRequest= function(){return new XMLHttpRequest();};
/**
* Object XMLHttpRequest
* @type constructor
*/
XMLHttpRequest.prototype=new Object();
function XMLHttpRequest(){};
/**
* function onreadystatechange
* @memberOf XMLHttpRequest
*/
XMLHttpRequest.prototype.onreadystatechange=function(){};
/**
* property readyState
* @type Number
* @memberOf XMLHttpRequest
*/
XMLHttpRequest.prototype.readyState=0;
/**
* property responseText
* @type String
* @memberOf XMLHttpRequest
*/
XMLHttpRequest.prototype.responseText="";
/**
* property responseXML
* @type Document
* @memberOf XMLHttpRequest
*/
XMLHttpRequest.prototype.responseXML=new Document();
/**
* property status
* @type Number
* @memberOf XMLHttpRequest
*/
XMLHttpRequest.prototype.status=0;
/**
* property statusText
* @type String
* @memberOf XMLHttpRequest
*/
XMLHttpRequest.prototype.statusText="";
/**
* function abort()
* @memberOf XMLHttpRequest
*/
XMLHttpRequest.prototype.abort=function(){};
/**
* function getAllResponseHeaders()
* @type String
* @memberOf XMLHttpRequest
*/
XMLHttpRequest.prototype.getAllResponseHeaders=function(){return "";};
/**
* function open(method, url, async, username, password)
* @param {String} method
* @param {String} url
* @param {Boolean} optional async
* @param {String} optional username
* @param {String} optional password
* @memberOf XMLHttpRequest
*/
XMLHttpRequest.prototype.open=function(method, url, async, username, password){};
/**
* function send(body)
* @param {Object} body
* @memberOf XMLHttpRequest
*/
XMLHttpRequest.prototype.send=function(body){};
/**
* function setRequestHeader(header,value)
* @param {String} header
* @param {String} value
* @memberOf XMLHttpRequest
*/
XMLHttpRequest.prototype.setRequestHeader=function(header,value){};
/**
* function getAllResponseHeaders()
* @param {String} header
* @type String
* @memberOf XMLHttpRequest
*/
XMLHttpRequest.prototype.getResponseHeader=function(header){return "";};