Greetings ,

I am trying to download a file with cross domain ajax here is the script :

Code:
  function getXDomainRequest() {
       var xdr = null;
     
       if (window.XDomainRequest) {     
        xdr = new XDomainRequest();
       } else if (window.XMLHttpRequest) {  
        xdr = new XMLHttpRequest();
       } else {
        alert("Votre navigateur ne gère pas l'AJAX cross-domain !");
      }
     
      return xdr;
     } 



   var xhr = new getXDomainRequest();
    xhr.responseType = 'blob';
    xhr.onload = function() {
    var a = document.createElement('a');
    a.href = window.URL.createObjectURL(xhr.response); // xhr.response is a blob
    a.download = filename; // Set the file name.
    a.style.display = 'none';
    document.body.appendChild(a);
    a.click();
    delete a;
    xhr.open('GET', url,false);
    xhr.send();
the getXDomainRequest() returns an XMLHTTPrequest ,and yet the script ends at the line
Code:
xhr.responseType = 'blob';
,wich is only supported by version 2 of xhr,does that mean my browser does not support it xhr 2,i'm using Mozilla firefox 25 how come?

If anyone catches the gap in this please let me know.