title: Declaring objects as parameters doesn't work?
body: <p>I get a "node not found" (DOM Exception 8) error when I later try to append objects I create with this code: </p>
  
  <pre><code>object.addimgs = function(a){
          for (var i = 0; i &lt; a.length; i++){
              a[i][0] = create("img", {position: "absolute"}, {src: a[i][1]});
          }
  }
  </code></pre>
  
  <p>The array I'm plugging in for <code>a</code> is this:  </p>
  
  <p><code>[[this.logo, "img/coffee.png"], [this.door, "img/door.png"]]</code></p>
  
  <p>So essentially I'm trying to use a for loop to declare objects because it would be more efficient than what I had working before:</p>
  
  <pre><code>this.logo = create("img", {position: "absolute"}, {src: "img/coffee.png"});
  this.door = create("img", {position: "absolute"}, {src: "img/door.png"});
  </code></pre>
  
  <p>... etc</p>
  
  <p>(<code>create(a, b, c){</code> is a custom function, I know the code above works)</p>
  
  <p>Any ideas why this wouldn't be working? Do the objects stop being objects when they're entered in as a parameter?</p>