I have spfx extension with dropdown selection on the top placeholder which it navigates between sites so when navigating between the sites I would like clear localStorage which it clears while navigating.

I was looking for solution where I can place on select of Site A from Site B I clear the localStorage of Site B

<div class="show_hide">          
<div id="list-items">  
         <a href="#"> Site A</a>  
         <a href="#"> Site B</a>  
         <a href="#"> Site C</a>  
         <a href="#"> Site D</a>  
         <a href="#"> Site E</a>  

  function show_hide() {  
     var click = document.getElementById("list-items");  


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.