I try to clone my document node but it’s not working.
I try this code
const dom = document.clone(true);
I have this error
TypeError: document.clone is not a function
I thinkg it’s very simple but i don’t find yet.
Thanks for help
Advertisement
Answer
Don’t you mean cloneNode
const dom = document.cloneNode(true); console.log(dom);