     true
 
   ###
+  Get classnames of element
+  ###
+  _getClassNames: ( _id ) ->
+    _elem = @_elements[_id]
+    if @_isSVGElem( _elem )
+      _elem.className.baseVal
+    else
+      _elem.className
+
+  ###
+  Set classnames for element
+  ###
+  _setClassNames: ( _id, _className ) ->
+    _elem = @_elements[_id]
+    if @_isSVGElem( _elem )
+      _elem.className.baseVal = _className
+    else
+      _elem.className = _className
+
+
+  ###
   Checks if the element has a named CSS className
   ###
   hasClassName: (_id, _className)->
     return null unless @_elements[_id]? # item is deleted
-    _classNames = @_elements[_id].className.split(' ')
+    _classNames = @_getClassNames( _id ).split(' ')
     return !!~_classNames.indexOf( _className )
 
   ###

      _elem[_key] = _val
    null

  ###
  Gets an element attribute directly from the element
  ###

    return null unless @_elements[_id]? # item is deleted
    if @hasClassName( _id, _className )
      _elem = @_elements[_id]
      _classNames = @_getClassNames( _id ).split(' ')
      _classNames.splice( _classNames.indexOf( _className ), 1 )
      @_setClassNames( _id, _classNames.join(' ') )
      @_attrCache[_id]['className'] = @_getClassNames( _id )
    null

  removeClassName: (_id, _className)->
