Assuming the following node(s) (which is/are actually not generated like this):
let outer = document.createElement('div');
outer.innerHTML = `
<div>foo</div>
<div>bar</div>
.
.
.
<div>whatever</div>
`;
Now I can append outer
to another node:
let body = document.querySelector('body');
body.append(outer);
But how to append only the inner of outer
without loosing event listeners etc.?