diff --git a/apps/demo/partials/layout/base.hbs b/apps/demo/partials/layout/base.hbs index 12873a644b..056421f850 100644 --- a/apps/demo/partials/layout/base.hbs +++ b/apps/demo/partials/layout/base.hbs @@ -47,10 +47,10 @@ targetElement.classList.add(`theme-${theme}`); }; - // Hide elements with hide-from-visual-tests class in Supernova preview + // Hide elements with hide-from-visual-tests class in Supernova preview with postMessage window.addEventListener('message', (event) => { // Check if the message is from the Supernova domain - if (event.origin === 'https://app.supernova.io') { + if (event.origin === 'https://app.supernova.io' || event.origin === 'https://cdpn.io') { if (event.data.action === 'hide-from-visual-tests') { const elements = document.querySelectorAll('.hide-from-visual-tests'); elements.forEach(el => {