title: Accessing iframe's parent localstorage variable from iframe
body: <p>I have this page <a href="https://jsfiddle.net/r91bLb7r/9/" rel="noreferrer">https://jsfiddle.net/r91bLb7r/9/</a> which I am using to display this iframe <a href="https://jsfiddle.net/r91bLb7r/8/" rel="noreferrer">https://jsfiddle.net/r91bLb7r/8/</a>.</p>
  
  <p>The parent page has a value in localstorage that I want to access from the iframe.</p>
  
  <p>This is the parent's code:</p>
  
  <pre><code>$(document).ready(function () {
      $( "#top" ).click(function() {
          localStorage.setItem("parent", "one");
          alert('I am the top page');
      });
  });
  </code></pre>
  
  <p>This is the iframe code:</p>
  
  <pre><code>$(document).ready(function () {
      $( "#map" ).click(function() {
          var mode = localStorage.getItem("parent");
          alert('I am the iframe'+mode);
      });
  });
  </code></pre>
  
  <p>How can I access the parent's localstorage value from the iframe?</p>