 
       current = @element.readAttribute name
       if arguments.length > 1
-        @element.writeAttribute name, arguments[1]
+        @element.writeAttribute name, value
 
       return current
 

      return this

    # With no parameters, returns the current value of the element (which must be a form control element, such as `<input>` or
    # `<textarea>`). With one parameter, updates the field's value, and returns the previous value.
    # TODO: Define behavior for multi-named elements, such as `<select>`.
    value: ->
      current = @element.getValue()

      if arguments.length > 0
        @element.setValue arguments[0]

      return current


    #
    # * name - the attribute to read or update, or an object of keys and values
    # * value - (optional) the new value for the attribute
    attribute: (name, value) ->

      if _.isObject name
        for name, value of name
