Node.appendChild() MDN
Element.append() MDN
https://codepen.io/Mi-Jou-Hsieh/pen/gOdzJpO?editors=1011
<section class="grandpa">
<div class="parent">
<p class="child"></p>
</div>
</section>
child.addEventListener('click', function (event) {
console.log('child is clicked!')
console.log(this)
console.log(event.target)
child.append('click!')
})
<div class="parent">
<p class="child">click!</p>
</div>