Truly independent web browser
<!DOCTYPE html>
<script src="../include.js"></script>
<style>
@keyframes recolor {
from { color: rgb(255, 0, 0); }
to { color: rgb(0, 0, 255); }
}
p::selection {
color: rgb(0, 128, 0);
animation: recolor 100s linear -50s paused;
}
p::search-text {
color: rgb(0, 128, 0);
animation: recolor 100s linear -50s paused;
}
p::spelling-error {
color: rgb(0, 128, 0);
animation: recolor 100s linear -50s paused;
}
</style>
<p id="target">Text</p>
<script>
test(() => {
for (const pseudoElement of ["::selection", "::search-text", "::spelling-error"])
println(`${pseudoElement}: ${getComputedStyle(target, pseudoElement).color}`);
});
</script>