title: Replace parent element with its contents
body: <p>I'm trying to do something similar/same as in this question:
  <a href="https://stackoverflow.com/questions/170004/how-to-remove-only-the-parent-element-and-not-its-child-elements-in-javascript">How to remove only the parent element and not its child elements in JavaScript?</a></p>
  
  <pre><code>&lt;div&gt;
      This is some text here
      &lt;h2&gt;This is more text&lt;/h2&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>All I want is to remove the H2 tag. The result should be:</p>
  
  <pre><code>&lt;div&gt;
      This is some text here
      This is more text
  &lt;/div&gt;
  </code></pre>
  
  <p>Assume that I have the H2 element already:</p>
  
  <pre><code>if (parentElement.nodeName.toLowerCase() == "h2") {
      //now what? I basically want to this: $.replaceWith(parentElement.innerText)
      //just without jQuery
  }
  </code></pre>