     tpl.on 'raw', (el, html) ->
         delay.call el, ->
             nextAnimationFrame ->
-                el._dom.innerHTML = html
+                el._dom?.innerHTML = html
 
     tpl.on 'show', (el) ->
         delay.call el, ->

                parent._dom.push(el._dom)
            else
                nextAnimationFrame ->
                    parent._dom.appendChild(el._dom)

    tpl.on 'close', (el) ->
        # FIXME hm, ... namespace handling should be in asyncxml

    tpl.on 'replace', (el, tag) ->
        delay.call el, ->
            nextAnimationFrame ->
                return if removed el
                _dom = tag._dom ? tag
                return unless _dom?.length > 0
                el.parent?._dom?.replaceChild(_dom)
