blob: 37f0c123bd75d79f4aafce1aea31dcc910f79942 [file] [log] [blame]
<!DOCTYPE html>
<style>
#target::before { content: "FAIL (string) "; }
</style>
<div id="target" my-attr="FAIL (attribute) ">test</div>
<script>
onload = function(){
var s = document.createElement("style");
s.textContent = "#target::before { content: attr(my-attr); }"
var head = document.querySelector("head");
head.appendChild(s);
target.offsetTop;
target.setAttribute("my-attr", "PASS ");
};
</script>