using new static methods for generating object url when loading html files as well

This commit is contained in:
Pavle Goloskokovic 2017-10-12 18:10:58 +02:00
parent a0c1d129ce
commit 10eaa46ffa

View file

@ -74,7 +74,7 @@ var HTMLFile = new Class({
this.data.onload = function ()
{
URL.revokeObjectURL(_this.data.src);
File.revokeObjectURL(_this.data);
_this.onComplete();
@ -83,14 +83,14 @@ var HTMLFile = new Class({
this.data.onerror = function ()
{
URL.revokeObjectURL(_this.data.src);
File.revokeObjectURL(_this.data);
_this.state = CONST.FILE_ERRORED;
callback(_this);
};
this.data.src = URL.createObjectURL(blob);
File.createObjectURL(this.data, blob, 'image/svg+xml');
}
});