javascript add adjacent html

JavaScript
ul = document.querySelector('ul');

ul.insertAdjacentHTML('afterbegin','<li>Hello</li>'); 

// 	 <ul>
//		<li>Hello</li>
//    </ul><!-- beforebegin -->
<p>
  <!-- afterbegin -->
  foo
  <!-- beforeend -->
</p>
<!-- afterend -->
Source

Also in JavaScript: