<!DOCTYPE html>
<html>
<title>':lang()': dynamic changes are seen (bug 53783)</title>
<style>
p:lang(x) { background: green }
</style>
<div>
<p id="target1">This line should have a green background.
<p id="target2" lang="x">This line should NOT have a green background.
<p id="target3" lang="x">This line should NOT have a green background.
<p id="target4" lang="x">This line should NOT have a green background.
</div>
<script>
document.getElementById('target1').lang = "x";
document.getElementById('target2').lang = "y";
document.getElementById('target3').removeAttribute('lang');
document.getElementById('target4').lang = "";
</script>
</html>
