work!

<div div>xyz</div>
<output style="color:red"></output>
let fn={}; fn.q=(d=>document.querySelector(d))
fn.q('output').appendChild(fn.q('[div]').cloneNode(true))
Sign up for free and join this conversation.
Sign Up
If you already have a Qiita account log in.