[ 
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' 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}



  was:
XHR call with responseType set to 'arraybuffer' or 'blob' fail on Windows Phone 
8 because there is no response property in the XMLHttpRequest Object.

The workaround is to use xhr.wrappedXHR.response instead or add to XHRHelper.cs:





> 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' 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}



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

Reply via email to