<!DOCTYPE html>
<style>
    #target::before { content: "FAIL (string) "; }
</style>
<div id="target">test</div>
<script>
onload = function(){
    target.setAttribute("my-attr", "FAIL (attribute) ");
    target.offsetTop;
    document.styleSheets[0].cssRules[0].style.content = "attr(my-attr)";
    target.setAttribute("my-attr", "PASS ");
};
</script>
