title: How to create HTML5 data attribute in an iframe
body: <p>I'm trying to pull the innerText of an H1 (which isn't in the iframe and has the "product name" in it) into the  of a form button that is in an owned iframe (not-3rd party). This is my code below, which obviously isn't working. 
  Thank you in advance!</p>
  
  <pre><code>&lt;script type='text/javascript'&gt;
  
  var productName = document.getElementsByTagName("h1")[0].getAttribute("innerHTML");
  var links = document.querySelectorAll("input");
  for(var i = 0; i &lt; links.length; i++) {
    links[i].dataset.productName = productName;
  }
  
  &lt;/script&gt;
  </code></pre>