dom.thumbnails.appendChild()

If this is working it is only because of an implicitly created window.thumbnails based on the element id.