Answer:
No, localStorage and sessionStorage are both undefined in a webworker process.
You would have to call postMessage() back to the Worker's originating code, and have that code store the data in localStorage.
Interestingly, a webworker can use an AJAX call to send/retrieve info to/from a server, so that may open possibilities, depending on what you're trying to do.
Asked In: Many Interviews |
Alert Moderator