9996435f by Michael Richards

Remove internal binders. These should be implemented as subclasses on Rivets.Bin…

…der and should be kept to a minimum.
1 parent b547428b
......@@ -24,7 +24,7 @@ class Rivets.Binding
# containing view, the DOM node, the type of binding, the model object and the
# keypath at which to listen for changes.
constructor: (@view, @el, @type, @key, @keypath, @options = {}) ->
unless @binder = Rivets.internalBinders[@type] or @view.binders[type]
unless @binder = @view.binders[type]
for identifier, value of @view.binders
if identifier isnt '*' and identifier.indexOf('*') isnt -1
regexp = new RegExp "^#{identifier.replace('*', '.+')}$"
......@@ -642,15 +642,6 @@ Rivets.binders =
else
el.removeAttribute @type
# Rivets.internalBinders
# ----------------------
# Contextually sensitive binders that are used outside of the standard attribute
# bindings. Put here for fast lookups and to prevent them from being overridden.
Rivets.internalBinders =
textNode: (node, value) ->
node.data = value ? ''
# Rivets.components
# -----------------
......