blob: 1929c16e88a8d8e1b67af927c7afb759a4d07b19 [file] [edit]
<!DOCTYPE html><!-- webkit-test-runner [ SpatialPortalEnabled=false ] -->
<html>
<style>
#portal { spatial: portal; width: 300px; height: 150px; portal-transform: none; }
</style>
<body>
<div id="portal">
<span id="content">Hello!</span>
</div>
<pre id="results"></pre>
<script>
window.testRunner?.dumpAsText();
const portal = document.getElementById("portal");
const lines = [];
lines.push(`portal-transform is supported: ${CSS.supports("portal-transform", "auto")}`);
lines.push(`portal-transform list is supported: ${CSS.supports("portal-transform", "auto rotateY(45deg)")}`);
lines.push(`portal-transform computed style is exposed: ${getComputedStyle(portal).portalTransform !== undefined}`);
portal.style.portalTransform = "none";
lines.push(`portal-transform survives in cssText: ${portal.style.cssText.includes("portal-transform")}`);
portal.style.portalTransform = "auto rotateY(45deg)";
lines.push(`portal-transform list survives in cssText: ${portal.style.cssText.includes("portal-transform")}`);
results.textContent = lines.join("\n");
portal.remove();
</script>
</body>
</html>