<html>
    <head>
        <style>
            .haveContent:after { content: "foo"; }
        </style>
    </head>
    <body>
        <div>
            <a id="foo" class="haveContent"><img src="resources/apple.gif" alt=""/><br/></a>
        </div>
                
        <script>
            document.body.offsetWidth;
            document.getElementById('foo').className='';
            document.body.offsetWidth;
        </script>
    </body>
</html>
