title: Custom localStorage js function not running in Chrome
body: <h2>What I'm trying to do:</h2>
  <p>Create my own storage API on top of localStorage so it is easier to use in my own code.</p>
  <h2>Why?</h2>
  <p>So it has an API for my purposes and can be extended later.</p>
  <h2>System:</h2>
  <p>Chrome Version: Version 22.0.1229.94 m</p>
  <p>JSFiddle: <a href="http://jsfiddle.net/ttback/kr88W/" rel="nofollow noreferrer">http://jsfiddle.net/ttback/kr88W/</a></p>
  <h2>Error</h2>
  <p>The fiddle will trigger an error in Console:</p>
  <h3>TypeError: Property 'localStorageSave' of object # is not a function</h3>
  <p>This works in IE 8 and Firefox 16.0.1, so I am wondering if I'm missing something or is it a Chrome bug.</p>
  <h2>Code:</h2>
  <pre><code>&lt;html&gt;
  &lt;head&gt;
  &lt;title&gt;JS function not working in Chrome&lt;/title&gt;
  &lt;script type=&quot;text/javascript&quot;&gt;
  var localStorage = localStorage || {};
  localStorage.localStorageSave = function(){
      alert(&quot;SAVE&quot;);
  };
  localStorage.localStorageSave();
  &lt;/script&gt;
  &lt;/head&gt;
  &lt;body&gt;
  
      
  &lt;/body&gt;
  
  &lt;/html&gt;​
  </code></pre>