     catch e
       console.error('failed to compile', args, script, e)
 
-  # generate a callback for an event expression in a way that preserves scope, e.g. on_x="console.log(value, this, ...)"
-  eventCallback = (name, script, scope, fnargs=['value']) ->
-    # console.log 'binding to event expression', name, script, scope, fnargs
-    js = compileScript(script, fnargs)
-    ->
-      if name of scope
-        args = [scope[name]]
-      else 
-        args = arguments
-      # console.log 'event callback', name, args, scope, js
-      js.apply(scope, args)
-
-
-  # this _must_ be called after initFromElement() to allow late binding constraints
-  constraintScopes = []
-  initConstraints = ->
-    for constraint in constraintScopes
-      constraint._bindConstraints()
-    constraintScopes = []
 
   class Node extends Eventable
     matchConstraint = /\${(.+)}/
+
+    # generate a callback for an event expression in a way that preserves scope, e.g. on_x="console.log(value, this, ...)"
+    eventCallback = (name, script, scope, fnargs=['value']) ->
+      # console.log 'binding to event expression', name, script, scope, fnargs
+      js = compileScript(script, fnargs)
+      ->
+        if name of scope
+          args = [scope[name]]
+        else 
+          args = arguments
+        # console.log 'event callback', name, args, scope, js
+        js.apply(scope, args)
 
     constructor: (el, attributes = {}) ->
       @subnodes = []

      attributes[i.name] = i.value
    attributes

  # initialize an element
  initFromElement = (el) ->
    initElement(el)
    initConstraints()

  specialtags = ['handler', 'method', 'attribute', 'setter']
  # recursively init classes based on an existing element

        bindings: {}

      bindings = @constraints[property].bindings
      scopes = findPropertyBindings(expression)
      # console.log 'found scopes', scopes
      for scope in scopes
        bindexpression = scope.binding
