Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

listen to localstorage changes

var originalSetItem = localStorage.setItem; 
localStorage.setItem = function(){
    document.createEvent('Event').initEvent('itemInserted', true, true);
    originalSetItem.apply(this, arguments);
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #listen #localstorage
ADD COMMENT
Topic
Name
8+3 =