Source code
Revision control
Copy as Markdown
Other Tools
Test Info:
- This WPT test may be referenced by the following Test IDs:
- /css/css-view-transitions/escaped-name.html - WPT Dashboard Interop Dashboard
<!DOCTYPE html>
<html class=reftest-wait>
<title>View transitions: escaped names</title>
<link rel="author" href="mailto:vmpstr@chromium.org">
<link rel="match" href="escaped-name-ref.html">
<script src="/common/reftest-wait.js"></script>
<style>
:root { view-transition-name: none; }
#first { view-transition-name: first\!; }
#second { view-transition-name: secon\'d; }
#third { view-transition-name: third\000021; }
.box {
background: green;
width: 100px;
height: 100px;
position: relative;
}
::view-transition-group(*),
::view-transition-new(*),
::view-transition-old(*),
::view-transition-image-pair(*) {
animation-play-state: paused;
}
.box.after {
background: red;
left: 100px;
}
</style>
<div class="box" id="first"></div>
<div class="box" id="second"></div>
<div class="box" id="third"></div>
<script>
failIfNot(document.startViewTransition, "Missing document.startViewTransition");
async function runTest() {
document.startViewTransition(() => {
first.classList.add("after");
second.classList.add("after");
third.classList.add("after");
}).ready.then(takeScreenshot);
}
onload = () => requestAnimationFrame(() => requestAnimationFrame(runTest));
</script>