OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2008, 2011 Apple Inc. All rights reserved. | 2 * Copyright (C) 2008, 2011 Apple Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * | 7 * |
8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
(...skipping 22 matching lines...) Expand all Loading... |
33 "document", | 33 "document", |
34 "json", | 34 "json", |
35 "text", | 35 "text", |
36 "stream" | 36 "stream" |
37 }; | 37 }; |
38 | 38 |
39 [ | 39 [ |
40 GlobalContext=Window&WorkerGlobalScope, | 40 GlobalContext=Window&WorkerGlobalScope, |
41 ActiveDOMObject, | 41 ActiveDOMObject, |
42 Constructor, | 42 Constructor, |
43 ConstructorCallWith=ScriptExecutionContext, | 43 ConstructorCallWith=ExecutionContext, |
44 CustomConstructor(optional XMLHttpRequestOptions options) | 44 CustomConstructor(optional XMLHttpRequestOptions options) |
45 ] interface XMLHttpRequest : XMLHttpRequestEventTarget { | 45 ] interface XMLHttpRequest : XMLHttpRequestEventTarget { |
46 // event handler attributes | 46 // event handler attributes |
47 attribute EventHandler onreadystatechange; | 47 attribute EventHandler onreadystatechange; |
48 | 48 |
49 // state | 49 // state |
50 const unsigned short UNSENT = 0; | 50 const unsigned short UNSENT = 0; |
51 const unsigned short OPENED = 1; | 51 const unsigned short OPENED = 1; |
52 const unsigned short HEADERS_RECEIVED = 2; | 52 const unsigned short HEADERS_RECEIVED = 2; |
53 const unsigned short LOADING = 3; | 53 const unsigned short LOADING = 3; |
54 const unsigned short DONE = 4; | 54 const unsigned short DONE = 4; |
55 | 55 |
56 [SetterRaisesException] attribute unsigned long timeout; | 56 [SetterRaisesException] attribute unsigned long timeout; |
57 readonly attribute unsigned short readyState; | 57 readonly attribute unsigned short readyState; |
58 | 58 |
59 [SetterRaisesException] attribute boolean withCredentials; | 59 [SetterRaisesException] attribute boolean withCredentials; |
60 | 60 |
61 [Custom, ActivityLog=Access, RaisesException] void open(DOMString method, DO
MString url, optional boolean async, optional DOMString user, optional DOMString
password); | 61 [Custom, ActivityLogging=AccessForAllWorlds, RaisesException] void open(DOMS
tring method, DOMString url, optional boolean async, optional DOMString user, op
tional DOMString password); |
62 | 62 |
63 [ActivityLog=Access, RaisesException] void setRequestHeader(DOMString header
, DOMString value); | 63 [ActivityLogging=AccessForAllWorlds, RaisesException] void setRequestHeader(
DOMString header, DOMString value); |
64 | 64 |
65 [Custom, RaisesException] void send(); | 65 [Custom, RaisesException] void send(); |
66 | 66 |
67 void abort(); | 67 void abort(); |
68 | 68 |
69 readonly attribute XMLHttpRequestUpload upload; | 69 readonly attribute XMLHttpRequestUpload upload; |
70 | 70 |
71 // response | 71 // response |
72 [TreatReturnedNullStringAs=Undefined, RaisesException] DOMString getAllRespo
nseHeaders(); | 72 [TreatReturnedNullStringAs=Undefined, RaisesException] DOMString getAllRespo
nseHeaders(); |
73 [TreatReturnedNullStringAs=Null, RaisesException] DOMString getResponseHeade
r(DOMString header); | 73 [TreatReturnedNullStringAs=Null, RaisesException] DOMString getResponseHeade
r(DOMString header); |
74 [CustomGetter, GetterRaisesException] readonly attribute DOMString responseT
ext; // The custom getter implements TreatReturnedNullStringAs=Null | 74 [CustomGetter, GetterRaisesException] readonly attribute DOMString responseT
ext; // The custom getter implements TreatReturnedNullStringAs=Null |
75 [GetterRaisesException] readonly attribute Document responseXML; | 75 [GetterRaisesException] readonly attribute Document responseXML; |
76 | 76 |
77 [SetterRaisesException] attribute XMLHttpRequestResponseType responseType; | 77 [SetterRaisesException] attribute XMLHttpRequestResponseType responseType; |
78 [CustomGetter, GetterRaisesException] readonly attribute Object response; | 78 [CustomGetter, GetterRaisesException] readonly attribute Object response; |
79 | 79 |
80 [GetterRaisesException] readonly attribute unsigned short status; | 80 [GetterRaisesException] readonly attribute unsigned short status; |
81 [GetterRaisesException] readonly attribute DOMString statusText; | 81 [GetterRaisesException] readonly attribute DOMString statusText; |
82 | 82 |
83 // Extension | 83 // Extension |
84 void overrideMimeType(DOMString override); | 84 void overrideMimeType(DOMString override); |
85 }; | 85 }; |
OLD | NEW |