const reader = new FileReader();
console.log("EMPTY", reader.readyState); // readyState will be 0
reader.readAsText(blob);
console.log("LOADING", reader.readyState); // readyState will be 1
reader.onloadend = () => {
console.log("DONE", reader.readyState); // readyState will be 2
};FileReader: readyState property / notebook
FileReader: readyState property
Runnable notebook: every JavaScript, HTML and CSS example on this page executes in a sandboxed local frame. Nothing leaves the browser.