                     @emit 'close', this
                     @emit 'end'
                     @writable = false
+                    set_ready = =>
+                        @isready = yes
+                        @emit 'ready'
+                    if @builder?
+                        @builder.approve('ready', this, set_ready)
+                    else
+                        set_ready()
                 if @builder?
                     @builder.approve('end', this, close_tag)
                 else

        @buffer = [] # after this tag all children emitted data
        @pending = [] # no open child tag
        @parent = @builder
        @closed = false
        @writable = true
        @hidden = no
        @isempty = yes
        @content = ""
        @children children, opts

            @closed = yes
        this

    ready: (callback) =>
        return callback?() if @closed is yes
        @once 'end', callback

    # intern getter to let intern tag structure stay in sync with eg dom
    query: (type, tag, key) ->
        if type is 'attr'
