<div class="red square"></div></div>
  </div>
  <script>
    window.addEventListener("TestRendered", async () => {
        container.style.contain = "paint";
        await waitForAtLeastOneFrame();
        takeScreenshot();
    });
  </script>
</body>
</html>
