Implement read methods on FileReaderSync

This commit is contained in:
Jonas Reinwald 2017-12-07 16:57:06 +01:00 committed by Josh Matthews
parent 3e8caa4679
commit 0fdafb08c8
9 changed files with 277 additions and 104 deletions

View file

@ -34,6 +34,7 @@ interface DOMException {
const unsigned short TIMEOUT_ERR = 23;
const unsigned short INVALID_NODE_TYPE_ERR = 24;
const unsigned short DATA_CLONE_ERR = 25;
const unsigned short NOT_READABLE_ERR = 26;
// Error code as u16
readonly attribute unsigned short code;

View file

@ -8,8 +8,12 @@
interface FileReaderSync {
// Synchronously return strings
// ArrayBuffer readAsArrayBuffer(Blob blob);
// DOMString readAsBinaryString(Blob blob);
// DOMString readAsText(Blob blob, optional DOMString label);
// DOMString readAsDataURL(Blob blob);
[Throws]
ArrayBuffer readAsArrayBuffer(Blob blob);
[Throws]
DOMString readAsBinaryString(Blob blob);
[Throws]
DOMString readAsText(Blob blob, optional DOMString label);
[Throws]
DOMString readAsDataURL(Blob blob);
};