Source code

Revision control

Copy as Markdown

Other Tools

Test Info:

<!DOCTYPE html>
<html class="reftest-wait">
<head>
<title>Check for correctly updating :placeholder-shown matching on type change</title>
<link rel="match" href="selector-placeholder-shown-type-change-002-ref.html">
<style>
span { color: green; }
:placeholder-shown + span { color: red }
</style>
<script>
onload = function() {
// setTimeout because in some browsers apparently a toplevel restyle
// happens right after the load event fires?
setTimeout(function() {
document.querySelector("input").type = "hidden";
document.documentElement.className = "";
}, 10);
}
</script>
</head>
<body>
<input placeholder="text"><span>This should be green</span>
</body>
</html>