detect property display from no display to display block
<p>I am trying to detect when an elements display property has changed. Initially the element has no display property. I want to alert when the element has changed. I've tried the following the code, but nothing alerts.</p>

<pre><code>document.getElementById('xxx').addEventListener('DOMAttrModified', function(e){
  if (e.attrName === 'style') {
    if (e.newValue === 'block') {
      alert('test!');
    }
  }
}, false);

setTimeout(function () {
  var xxx = document.getElementById('xxx');
  xxx.style.display = 'block';
  console.log(xxx);
}, 5000);
</code></pre>
