<style> | |
.hasRunIn:before { | |
content: "FAIL"; | |
display: run-in; | |
color: red; | |
} | |
</style> | |
<ul class="hasRunIn"> | |
<li>x</li> | |
</ul> | |
<div> | |
<div class="hasRunIn"> | |
<p>x</p> | |
</div> | |
</div> | |
<script> | |
// Force layout. | |
document.body.clientHeight; | |
// This is not a Live Collection, so it is safe to iterate. | |
var elems = document.querySelectorAll('.hasRunIn'); | |
for (var i=0; i<elems.length; ++i) | |
elems[i].className = ''; | |
</script> |