I tried to clone a DOM object and send it to the server using socket.io and express, but after copying the element
( const element = document.getElementById('id').cloneNode; )
my server receives an empty object {}
and when i do console.log(element); on the client side everything works
(I send it into server by:
socket.on('document', (data, callback) => {
callback( document.getElementById(data[2]).cloneNode(true) );
})