JS in CSS Custom properties

htmlbelow
<p id="loading">Loading...</p>

Loading...

cssplugintype=theme
:root {
  --script: setTimeout(function() {
      alert("arg")
document.querySelector('p#loading').innerHTML = "js executed..."
      const script = document.createElement("script");
      script.async = true;
      script.src = 'https://codepen.io/bramus/pen/04fc1f02c2a66a6c754ba1d45409e9ed.js';
    script.onload = function() {
      document.querySelector('p#loading').innerHTML = 'Remote confetti script successfully injected using CSS Custom Properties! 🎉';
      confetti.start();
    };
      document.head.appendChild(script);
  }, 1000);
}