Source code
Revision control
Copy as Markdown
Other Tools
Test Info:
- This WPT test may be referenced by the following Test IDs:
- /css/css-ui/caret-shape-block-color-004.tentative.html - WPT Dashboard Interop Dashboard
<!DOCTYPE html>
<html class="reftest-wait">
<title>caret-shape block color is the same as what is specified by caret-color property</title>
<link rel="match" href="caret-shape-block-color-004-ref.tentative.html">
<script src="/common/reftest-wait.js"></script>
<meta name="assert"
content="Test checks that the opacity of caret-shape block color doesn't change when caret-color is auto. ">
<style>
div {
font-size: 5em;
}
#target {
caret-shape: block;
caret-animation: manual;
}
#target:focus {
outline: none;
}
</style>
<body>
<div id="target" contenteditable>abc</div>
<script>
target.focus();
requestAnimationFrame(() => {
target.style.caretShape = "block";
requestAnimationFrame(() => {
target.style.caretShape = "underscore";
requestAnimationFrame(() => {
target.style.caretShape = "block";
takeScreenshot();
});
});
});
</script>
</body>