[ 
https://issues.apache.org/jira/browse/CB-11583?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15379294#comment-15379294
 ] 

Sergey Shakhnazarov commented on CB-11583:
------------------------------------------

[~wuairen], see this 
[comment|https://issues.apache.org/jira/browse/CB-10960?focusedCommentId=15229824&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-15229824]
 regarding {{TypeError: Illegal constructor}}.

> file plugin var blob = new Blob([this.response], {type: 'image/png'}); report 
> Uncaught TypeError: Illegal constructor
> ---------------------------------------------------------------------------------------------------------------------
>
>                 Key: CB-11583
>                 URL: https://issues.apache.org/jira/browse/CB-11583
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: Plugin File
>    Affects Versions: 6.0.0
>         Environment: Samsung GT-N7100 android 4.1.1, API 16
>            Reporter: wuairen
>
> var blob = new Blob([this.response], { type: 'image/png' });
> When I test the below sample code, the above line code will report error as: 
> E/Web Console: Uncaught TypeError: Illegal constructor:175
> While it works well in the emulator(which is Android 6.0, API 23).
> My question: which android API version cordova file plugin support ? Where 
> can I find out all the platform's version which cordova's feature were 
> expecting to support?
> code and its origins site is here: 
> http://cordova.apache.org/docs/en/latest/reference/cordova-plugin-file/index.html#write-to-a-file-
> function getSampleFile(dirEntry) {
> var xhr = new XMLHttpRequest();
> xhr.open('GET', 'http://cordova.apache.org/static/img/cordova_bot.png', true);
> xhr.responseType = 'blob';
> xhr.onload = function() {
>     if (this.status == 200) {
>         var blob = new Blob([this.response], { type: 'image/png' });
>         saveFile(dirEntry, blob, "downloadedImage.png");
>     }
> };
> xhr.send();
> }



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to