tma03
// TODO: Q1(c)(iii)
// Make an event listener to save text when it changes:
// …get the textarea element’s current value
// (getting HTML input values is in Block 2 Part 2 Section 6)
// …make a text item using the value
// (demonstrated elsewhere in this file)
// …store the item in local storage using the given key
// (local storage is in Block 3 Part 5)
// Connect the event listener to the textarea element:
// TODO: Q1(c)(iv) Task 1 of 3
// Instead of adding a dummy image:
// …trigger the click event of the hidden file input element
// (demonstrated in Block 3 Part 4)
}
// Function to handle a new file being selected
function processFile(event) {
// TODO: Q1(c)(iv) Task 2 of 3
// Complete this event listener to read the file when it is selected:
// (reading files into a data URL using FileReader is demonstrated in Block 3 Part 4)
// …then rather than using the data URL as src for an Image element,
// …use it to add a new image entry, using the current timestamp to make a key
// (demonstrated elsewhere in this file)
//
// TODO: Q1(c)(iv) Task 3 of 3
// In the same event listener, make an image item using the data URL
// (demonstrated elsewhere in this file)
// Store the item in local storage using the given key
// (demonstrated elsewhere in this file)
Collepals.com Plagiarism Free Papers
Are you looking for custom essay writing service or even dissertation writing services? Just request for our write my paper service, and we'll match you with the best essay writer in your subject! With an exceptional team of professional academic experts in a wide range of subjects, we can guarantee you an unrivaled quality of custom-written papers.
Get ZERO PLAGIARISM, HUMAN WRITTEN ESSAYS
Why Hire Collepals.com writers to do your paper?
Quality- We are experienced and have access to ample research materials.
We write plagiarism Free Content
Confidential- We never share or sell your personal information to third parties.
Support-Chat with us today! We are always waiting to answer all your questions.