 
     toString: () =>
         "<#{@name}#{new_attrs @attrs}" +
-            if @closed is 'self'
+            if @isempty
                 "/>"
             else if @closed
                 ">#{@content}</#{@name}>"

        @parent = @builder
        @closed = no
        @writable = true
        @hidden = no
        @isready = no
        @isempty = yes
        @content = ""
        @children children, opts
        @$tag = sync_tag


    end: () =>
        if not @closed
            if @isempty
                @isempty = no
                @isselfclosing = yes
            @closed = 'approving'
            close_tag = =>
                @closed = yes
                @emit 'close', this
                @writable = false
                set_ready = =>
