title: Local javascript cannot open local file
body: <p>Please tell me, why local javascript cannot open a local file?
  I'm trying to create a simple javascript/html app that shall run on the local machine from local filesystem. This app is trying to read the configuration file (json) using different methods, but gets the following errors (Chrome):</p>
  
  <ol>
  <li><p>In case of XMLHttpRequest, method <code>open("GET", filename, true)</code> throws an exception: </p>
  
  <blockquote>
    <p>XMLHttpRequest cannot load file:///bla-bla-bla. Cross origin requests are only supported for protocol schemes: http, data, chrome, chrome-extension, https, chrome-extension-resource.</p>
  </blockquote></li>
  <li><p>In case of <code>document.createElement("iframe").src=filename</code> I have another exception:</p>
  
  <blockquote>
    <p>VM596:1 Uncaught DOMException: Failed to read the 'contentDocument' property from 'HTMLIFrameElement': Blocked a frame with origin "null" from accessing a cross-origin frame."</p>
  </blockquote></li>
  <li><p>In case of <code>var f=new File([], filename, { type: "text/plain" });</code> I've got the File object with the zero size and no errors at all. FileReader returns an empty result then.</p></li>
  </ol>
  
  <p>So, my questions are: 
  Why is it "cross-origin"? These files are stored in the same directory!
  And how could I open the local file from the same origin/directory I run the script?
  Please help.</p>
  
  <p>P.S.: Yes, I know about <code>--allow-file-access-from-files</code> but I need to run this by customers.</p>