CSS 3 Module <== Test # ==>
W3C Selectors 148 of 156
Testing Date Revision
NEGATED Dynamic handling of :empty (ID #d1b) 14-november-2001 1.0

NOTE: The UA must support ECMA-262 and DOM Level 2 Core for this test.

The following bar should be green.

   #test { background: lime; display: block; padding: 1em; }
   #test:empty { background: red; }

 <div>

  <script>
   

    function test() {
      document.getElementById('test').appendChild(document.createTextNode(''));
    }

    window.setTimeout("test()", 100);
   
  </script>

  <p> The following bar should be green. </p>

  <div id="test"></div>

 </div>