         @level++
         tag
 
-    end: (data) =>
+    write: (data) =>
+        @emit 'data', data
+
+    end: () =>
         if @pending.length
             @closed = 'pending'
-            @pending[0].once 'end', =>
-                @end(data)
-        else
-            @emit 'data', "#{indent this}#{data}" if data
+            @pending[0].once 'end', @end
+        else
             @emit 'end' if not @closed or @closed is 'pending'
             @closed = yes
         this

            for own k, v of key
                delete @attr[key]
                @emit 'attr:remove', this, key
        @headers = "<#{@name}#{new_attrs @attrs}" if @headers
        this

    children: (children) =>

        @Tag = @opts.Tag or Tag

    _new_tag: (parent, args...) =>
        new_tag.apply parent, [this].concat args

    _new_sync_tag: (parent, name, attrs, children, opts) =>
