Javascript event update - adding node to lastChild