- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
HTML5 / JS storage event handler
Storage event handlers only fire if the storage event triggered by another window. You can try to run the following code:
// event handler window.addEventListener('storage', storageEventHandlerFunc, false); function storageEventHandlerFunc(evt) { alert("Storage event called key: " + event.key ); switch(event.key){ case 'one': case 'two': batteryDCMeter(); break; case 'extPowerOn': rechargeBattery(); break; } } sessionStorage.setItem("someKey", "someValue");
- Related Articles
- How do I add a simple onClick event handler to an HTML5 canvas element?
- HTML DOM Storage Event
- Difference between Session Storage and Local Storage in HTML5
- How to pass an argument to the event handler in Tkinter?
- How do I pass an event handler to a component in ReactJS?
- How to add an event handler to an element in JavaScript HTML DOM?
- How to add an event handler to the specified element in JavaScript?\n
- Checking if a key exists in HTML5 Local Storage
- Example of Event Handlers in HTML5 CORS
- HTML5 Canvas and select / drag-and-drop features in a JS library?
- How to store a name permanently using HTML5 Local Storage?
- Difference between dragenter and dragover event in HTML5
- How to use multiple click event on HTML5 canvas?
- EventSource vs. wrapped WebSocket with HTML5 Server-Side Event
- Handler in android ?

Advertisements