title: NS_ERROR_NOT_AVAILABLE: Component is not available
body: <p>I have a problem. I am trying to draw an image onto a canvas. The image is not from the HTML page, but on a file. Here is the code i use:</p>
  
  <pre><code>var img = new Image();
  img.src = "/images/logo.jpg";
  this._canvas.drawImage(img, 300, 300);// this is line 14
  </code></pre>
  
  <p>now, here's the problem. This does not seem to work on Firefox and IE10 (I haven't tested yet on other browsers). On Firefox (21) I get:  </p>
  
  <pre><code>[19:09:02.976] NS_ERROR_NOT_AVAILABLE: Component is not available @ file:///D:/Watermellon/scripts/base-classes.js:14
  </code></pre>
  
  <p>and on IE10 i get:  </p>
  
  <pre><code>SCRIPT16389: Unspecified error. 
  base-classes.js, line 14 character 13
  </code></pre>
  
  <p>The files and their directories are:  </p>
  
  <pre><code>root/index.html  
  root/scripts/base-classes.js  
  root/images/logo.jpg 
  </code></pre>
  
  <p>Now when I change the img.src to a URL (an image from another site) everything works fine, the image draws itself after a delay(for it's get from the url). What am I doing wrong?</p>