If looking to unload mosaic from the page, simply remove it from the document, and it will be cleaned up automatically: const m = document.querySelector('syndigo-mosaic') m.remove() // destroy the mosaic and cleanup it's internals