         # coerce value to type
         if name of @types
           type = @types[name]
-          if type == 'number'
-            value = parseFloat(value)
-        # console.log 'type', name, type, value
+          value = typemappings[type]?(value)
+          # console.log 'type', name, type, value
 
         # console.log 'setAttribute', name, value
         setter = 'set_' + name
         if setter of @
           # console.log 'calling setter', setter, value #, @[setter]
           @[setter]?(value)
-        else if name.indexOf('on') == 0
-          name = name.substr(2)
-          # console.log('binding to event expression', name, value, @)
-          @bind(name, @eventCallback(name, value, @))
-          return
         else
           # console.log 'setting style', name, value
           @[name] = value

      # console.log 'found scopes', scopes

      constraintBinding = @constraints[name]
      bindings = constraintBinding.bindings or= {}

      for scope in scopes
        bindexpression = scope.binding

      type = event.type
      if view?.events?[type]
        view.trigger(event.type, view)
        # console.log 'event', event.type, event.target.$view
      if @started
        requestTick 0, sender 
        @left = event.pageX
        @top = event.pageY
