title: Getting 0x80070005 - JavaScript runtime error: Access is denied while loading the MS word add-in
body: <p>When i start my add-in first it shows below error:</p>
  
  <blockquote>
    <p>0x80070005 - JavaScript runtime error: Access is denied.</p>
  </blockquote>
  
  <p>and Highlighted the </p>
  
  <blockquote>
    <p>var t=window.localStorage</p>
  </blockquote>
  
  <p>code in js file.
  Add-in working after click on continue button. Please advice me how i can handle this error while running the word add-in using visual studio 2015.</p>
  
  <p>I have used word javascript api and when i tried to use local storage, add-in stopped working due to local storage issue.</p>
  
  <p>Page Header:</p>
  
  <pre><code>&lt;head&gt;
      &lt;meta charset="UTF-8" /&gt;
      &lt;meta http-equiv="X-UA-Compatible" content="IE=Edge" /&gt;
      &lt;title&gt;Testing&lt;/title&gt;
  
      &lt;script src="Scripts/jquery-1.9.1.js" type="text/javascript"&gt;&lt;/script&gt;
      &lt;script src="Scripts/jquery-ui-1.12.0.custom/jquery-ui.min.js" type="text/javascript"&gt;&lt;/script&gt;
      &lt;script src="Scripts/FabricUI/MessageBanner.js" type="text/javascript"&gt;&lt;/script&gt;
  
     &lt;script src="https://appsforoffice.microsoft.com/lib/1/hosted/office.js" type="text/javascript"&gt;&lt;/script&gt;
      &lt;script src="Scripts/Office/MicrosoftAjax.js" type="text/javascript"&gt;&lt;/script&gt;
      &lt;link rel="stylesheet" type="text/css" href="fonts/css/font-awesome.min.css" /&gt;
      &lt;link rel="stylesheet" type="text/css" href="Scripts/jquery-ui-1.12.0.custom/jquery-ui.min.css" /&gt;
      &lt;link href="Home.css" rel="stylesheet" type="text/css" /&gt;
      &lt;script src="DesignElements.js" type="text/javascript"&gt;&lt;/script&gt;
  
  
  
      &lt;link rel="stylesheet" href="https://appsforoffice.microsoft.com/fabric/2.2.0/fabric.min.css"&gt;
      &lt;link rel="stylesheet" href="https://appsforoffice.microsoft.com/fabric/2.2.0/fabric.components.min.css"&gt;
      &lt;link rel="stylesheet" href="https://appsforoffice.microsoft.com/fabric/2.2.0/fabric.css"&gt;
      &lt;link rel="stylesheet" href="https://appsforoffice.microsoft.com/fabric/2.2.0/fabric.components.css"&gt;
  
      &lt;!--During development turn off caching--&gt;
    &lt;meta http-equiv="cache-control" content="max-age=0" /&gt;
    &lt;meta http-equiv="cache-control" content="no-cache" /&gt;
    &lt;meta http-equiv="expires" content="0" /&gt;
    &lt;meta http-equiv="expires" content="Tue, 01 Jan 1980 1:00:00 GMT" /&gt;
    &lt;meta http-equiv="pragma" content="no-cache" /&gt;
  &lt;/head&gt;
  </code></pre>
  
  <p>Thanks. </p>