[ 
https://issues.apache.org/jira/browse/CB-5965?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Piotr Plewa updated CB-5965:
----------------------------

    Description: 
responseType in XHR calls is ignored,

for example setting it to 'arraybuffer' or 'blob' fails on Windows Phone 8 
because the value is not being propagated into "wrappedXHR" as well as there is 
no 'response' property in the wrappedXHR Object.

The workaround is to use xhr.wrappedXHR.response instead or add into 
XHRHelper.cs:
{code:javascript}
Object.defineProperty(this, 'responseType', {
    set: function(val) {
        this.wrappedXHR.responseType = val;
    }
});
Object.defineProperty(this, 'response', {
    get: function() {
        return this.wrappedXHR.response;
    }
});
{code}



  was:
responseType in XHR calls is ignored,
for example setting it to 'arraybuffer' or 'blob' fail on Windows Phone 8 
because it is not propagated into "wrappedXHR" as well as there is no response 
property in the XMLHttpRequest Object.

The workaround is to use xhr.wrappedXHR.response instead or add into 
XHRHelper.cs:
{code:javascript}
Object.defineProperty(this, 'responseType', {
    set: function(val) {
        this.wrappedXHR.responseType = val;
    }
});
Object.defineProperty(this, 'response', {
    get: function() {
        return this.wrappedXHR.response;
    }
});
{code}




> XHR with responseType other than 'text' calls fail on WP8
> ---------------------------------------------------------
>
>                 Key: CB-5965
>                 URL: https://issues.apache.org/jira/browse/CB-5965
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: WP8
>    Affects Versions: 3.3.0
>         Environment: Windows Phone 8
>            Reporter: Piotr Plewa
>            Assignee: Jesse MacFadyen
>
> responseType in XHR calls is ignored,
> for example setting it to 'arraybuffer' or 'blob' fails on Windows Phone 8 
> because the value is not being propagated into "wrappedXHR" as well as there 
> is no 'response' property in the wrappedXHR Object.
> The workaround is to use xhr.wrappedXHR.response instead or add into 
> XHRHelper.cs:
> {code:javascript}
> Object.defineProperty(this, 'responseType', {
>     set: function(val) {
>         this.wrappedXHR.responseType = val;
>     }
> });
> Object.defineProperty(this, 'response', {
>     get: function() {
>         return this.wrappedXHR.response;
>     }
> });
> {code}



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)

Reply via email to