title: Using a "shortcut" function gives me a "Illegal invocation” error
body: <p>I'm having this code in Javascript ES6:</p>
  
  <pre><code>// Create a new object
  var foo = new A();
  
  // Create shortcuts to use localStorage faster
  foo.set = window.localStorage.setItem;
  foo.get = window.localStorage.getItem;
  
  // Try to use localStorage 
  foo.set('count', 1);
  </code></pre>
  
  <p>But I get "Illegal invocation” for the last line, and I don't understand why. </p>
  
  <p>Any idea how to fix this? </p>