blob: dc0cc823e4e3923b0d730de6338f07efd2d0afc0 [file] [log] [blame]
<head>
<style>
div { width: 200px; font-family: ahem; font-size: 40px; position: absolute; top: 0; left: 0; -webkit-font-smoothing: none; }
</style>
</head>
<body style="position: relative;">
<!-- There should be no red on the page. -->
<div style="color: red;">.AAAA B CC D <!-- -->E</div>
<div id="target" style="color: green;">AAAA B CC D <!-- -->E</div>
<script>
var target = document.getElementById("target");
target.removeChild(target.childNodes[1]);
target.offsetTop;
target.normalize();
target.firstChild.data = "." + target.firstChild.data;
</script>
</body>