I have a page that uses the jQuery one liner
$('#id').load('/url');
to load a fragment into the DOM at a specific place.
If I want to remove the dependency on jQuery, is there an easy alternative way to do this — possibly with the relatively new fetch() API?
Do it like so:
fetch('/url')
.then(response => response.text())
.then(value => {
document.getElementById('id').innerHTML = value
});