Ez a fordítás nem teljes. Kérjük segítsen ezt a cikket lefordítani angolról.
Az XMLHttpRequest.responseType
tulajdonság azon értékek felsorolása, melyek meghatározzák a válasz típusát. Ezek közül akár a programozó is választhat, maga állítva be a kívánt értéket. Ha üres szöveg van megadva a responseType értékének, akkor az alapértelmezett text
(szöveg) lesz használatban..
Setting the value of responseType to "document" is ignored if done in a Worker environment. When setting responseType
to a particular value, the author should make sure that the server is actually sending a response compatible to that format. If the server returns data that is not compatible to the responseType
that was set, the value of response
will be null
. Also, setting responseType
for synchronous requests will throw an InvalidAccessError
exception.
A responseType
által támogatott értékek és azok típusai a következők:
Érték | Aresponse tulajdonság adatípusa |
"" |
DOMString (alapértelmezett érték) |
"arraybuffer" |
ArrayBuffer |
"blob" |
Blob |
"document" |
Document |
"json" |
JSON |
"text" |
DOMString |
"moz-chunked-arraybuffer" |
Similar to When Ez a modul jelenleg csak a Firefox böngészőben működik. |
"ms-stream" | Azt jelzi, hogy a válasz egy letöltési adatfolyam részlete. Ezt csak a letöltési kérelmeknél támogatott és jelenleg csak az Internet Explorer böngészőben elérhető. |
Specifikációk
Specifikáció | Állapot | Megjegyzés |
---|---|---|
XMLHttpRequest | Living Standard | WHATWG élő szabvány |
Böngésző támogatottság
Feature | Chrome | Edge | Firefox (Gecko) | Internet Explorer | Opera | Safari (WebKit) |
---|---|---|---|---|---|---|
Basic support | 31 | (Yes) | 12[1] | 10 | 18 | 7.1 |
Feature | Android | Chrome for Android | Edge | Firefox Mobile (Gecko) | IE Mobile | Opera Mobile | Safari Mobile |
---|---|---|---|---|---|---|---|
Basic support |
4.0.3 [2] |
55 | (Yes) | 50[1] | 10 | ? | ? |
[1] A saját moz-blob
és a moz-chunked-text
értékek a Firefox 58 verziójából már teljesen el lettek távolítva.
[2] Csak a text
és az arraybuffer
típus támogatott.