 { deep_merge, indent, new_attrs, safe } = require './util'
 EVENTS = ['add', 'attr', 'attr:remove', 'text', 'remove', 'close']
 
-new_tag = (builder, name, attrs, children, opts) ->
+
+new_tag = (name, attrs, children, opts) ->
     unless typeof attrs is 'object'
         [opts, children, attrs] = [children, attrs, {}]
     else

        @Tag = @opts.Tag or Tag

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

    _new_sync_tag: (parent, name, attrs, children, opts) =>
        # sync tag, - same as normal tag, but closes it automaticly

        @content = ""
        @children children, @opts

    tag: =>
        @builder._new_tag this, arguments...

    $tag: =>
        @builder._new_sync_tag this, arguments...

    attr: (key, value) =>
        if typeof key is 'string'
