title: How to add/update text of elements created with insertAdjacentHTML method?
body: <p>I am trying to create <code>p</code> tags and inside them <code>span</code> with <code>insertAdjacentHTML</code> method and give each one of them unique id, and after that I want to change or update the <code>textContent</code>, but I don't know the reason why it is not working?. If you have the solution please help me.</p>
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>const wraper = document.querySelector("#wraper")
  const place2 = "afterbegin";
  const textOfTimerTile = `
  &lt;div class="dataWraper"&gt;
  &lt;p id="program"&gt;&lt;span id="programData"&gt;&lt;/span&gt;&lt;/p&gt;
  &lt;p id="machineId"&gt;&lt;span id="machineIdData"&gt;&lt;/span&gt;&lt;/p&gt;
  &lt;/div&gt;
  `;
  wraper.insertAdjacentHTML(place2, textOfTimerTile);
  
  const program = document.getElementById("program");
  const programData = document.getElementById("programData");
  const machineId = document.getElementById("machineId");
  const machineIdData = document.getElementById("machineIdData");
  
  program.textContent = "Program";
  programData.textContent = "Program Span";
  machineId.textContent= "Machine ID";
  machineIdData.textContent= "Machine Span";
  console.log("p tag ", program);
  console.log("span ", programData)</code></pre>
  <pre class="snippet-code-css lang-css prettyprint-override"><code>#program, #machineId{
  width: 150px;
  height: 100px;
  background-color: green
  }
  #programData, #machineIdData{
  width:100px;
  height: 60px;
  background-color: red;
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;div id="wraper"&gt;&lt;/div&gt;</code></pre>
  </div>
  </div>
  </p>