Update FileSaver: add the parameter: "disableAutoBOM".

This commit is contained in:
Cyril Schumacher
2015-10-15 16:58:53 +02:00
parent 3a6e1b8988
commit cf0a8f5d70
2 changed files with 11 additions and 4 deletions
+3 -2
View File
@@ -6,6 +6,7 @@
function testSaveAs() {
var data: Blob = new Blob(["Hello, world!"], {type: "text/plain;charset=utf-8"});
var filename: string = 'hello world.txt';
saveAs(data, filename);
var disableAutoBOM = true;
saveAs(data, filename, disableAutoBOM);
}
+8 -2
View File
@@ -20,8 +20,14 @@ interface FileSaver {
* @summary File name.
* @type {DOMString}
*/
filename: string
filename: string,
/**
* @summary Disable Unicode text encoding hints or not.
* @type {boolean}
*/
disableAutoBOM?: boolean
): void
}
declare var saveAs: FileSaver;
declare var saveAs: FileSaver;