title: How to listen a specific key on value change with Javascript?
body: <p>is there a way to listen value change for specific key? With below given code I get a window alert eachtime there is a change in local storage it works well but what i am looking for to add a event listener just for key : "Data".</p>
  
  <pre><code>&lt;body&gt;
    &lt;button onClick="setData1()"&gt;Set 1&lt;/button&gt;
    &lt;button onClick="setData2()"&gt;Set 2&lt;/button&gt;
  &lt;button onClick="clearData()"&gt;Clear&lt;/button&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  &lt;script&gt;
  window.addEventListener('storage', function(e) {  
  alert('Woohoo, someone changed my localstorage!');
  });
  
  function setData1(){
    console.log('SET');
    localStorage.setItem('Data', '1');
  }
  
  function setData2(){
    console.log('SET');
    localStorage.setItem('Data', '2');
  }
  
  function clearData(){
    console.log('CLEAR');
    localStorage.clear()
  }
  
  &lt;/script&gt;
  </code></pre>
  
  <p><a href="https://codepen.io/rahman23/pen/KKdyGOw" rel="nofollow noreferrer">https://codepen.io/rahman23/pen/KKdyGOw</a></p>