<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <title>iframe without src</title>
  </head>
  <body>
    <p><a href="#">link</a></p>
    <iframe></iframe>
    <iframe id="iframe"></iframe>
    <script>
      const a = document.createElement("a");
      a.href = "#";
      a.textContent = "link";
      setTimeout(() => {
        iframe.contentWindow.document.body.append(a);
      }, 0);
    </script>
  </body>
</html>

<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <title>iframe without src</title>
  </head>
  <body>
    <p><a href="#">link</a></p>
    <iframe></iframe>
    <iframe id="iframe"></iframe>
    <script>
      const a = document.createElement("a");
      a.href = "#";
      a.textContent = "link";
      setTimeout(() => {
        iframe.contentWindow.document.body.append(a);
      }, 0);

      const iframe2 = document.createElement("iframe");
      const a2 = a.cloneNode(true);
      document.body.append(iframe2);
      setTimeout(() => {
        iframe2.contentWindow.document.body.append(a2);
      }, 100);

      // Inserting a blank iframe after page load triggers this bug:
      // <bugzil.la/1415539>
      const iframe3 = document.createElement("iframe");
      const a3 = a.cloneNode(true);
      setTimeout(() => {
        document.body.append(iframe3);
        setTimeout(() => {
          iframe3.contentWindow.document.body.append(a3);
        }, 0);
      }, 1000);
    </script>
  </body>
</html>

Add demo for Firefox bug
Add demo for Firefox bug
