code is wrong and unused, so delete
it is wrong in the way that it does not always return a string
This commit is contained in:
parent
6921e9cd21
commit
b43754da6a
1 changed files with 0 additions and 14 deletions
|
@ -107,20 +107,6 @@ export class BlobHandle {
|
|||
}
|
||||
}
|
||||
|
||||
async readAsText() {
|
||||
if (this._buffer) {
|
||||
return this._buffer;
|
||||
} else {
|
||||
const reader = new FileReader();
|
||||
const promise = new Promise((resolve, reject) => {
|
||||
reader.addEventListener("load", evt => resolve(evt.target.result));
|
||||
reader.addEventListener("error", evt => reject(evt.target.error));
|
||||
});
|
||||
reader.readAsText(this._blob, "utf-8");
|
||||
return promise;
|
||||
}
|
||||
}
|
||||
|
||||
get url() {
|
||||
if (!this._url) {
|
||||
this._url = URL.createObjectURL(this._blob);
|
||||
|
|
Reference in a new issue