const h1TextNode = document.querySelector("h1").firstChild;
h1TextNode.after(" #h1");
h1TextNode.parentElement.childNodes;
// NodeList [#text "CharacterData.after()", #text " #h1"]
h1TextNode.data;
// "CharacterData.after()"CharacterData: after() method / notebook
CharacterData: after() method
Runnable notebook: every JavaScript, HTML and CSS example on this page executes in a sandboxed local frame. Nothing leaves the browser.