title: element.setAttribute is not a function
body: <p>So, i know that this has already been answered, but none of the previous answers managed to make my code work. I have a html structure as the following:</p>
  
  <pre><code>&lt;div class="form"&gt;
      &lt;div class="formrow"&gt;
          &lt;div class="previewcontainer"&gt;
              &lt;object id="preview"&gt;
              &lt;object&gt;
          &lt;/div&gt;
      &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>I am trying to set the data attribute to the object like this:</p>
  
  <pre><code>var link = "http://www.someurl.com";
  var preview = document.querySelectorAll ("#preview");
  preview.setAttribute("data", link);
  </code></pre>
  
  <p>However, I get an error <code>preview.setAttribute is not a function</code></p>