In the previous chapter, we came across an asynchronous event: reading the contents of a file using FileReader. This is how FileReader worked:
You might be wondering, what if I need to execute some code only after the event is complete? This is how FileReader handles it:
- Once the reading is complete, FileReader fires a load event
- It also has an onload() method that listens ...