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 ...@@ -24,7 +24,7 @@ class Rivets.Binding
24 # containing view, the DOM node, the type of binding, the model object and the 24 # containing view, the DOM node, the type of binding, the model object and the
25 # keypath at which to listen for changes. 25 # keypath at which to listen for changes.
26 constructor: (@view, @el, @type, @key, @keypath, @options = {}) -> 26 constructor: (@view, @el, @type, @key, @keypath, @options = {}) ->
27 unless @binder = Rivets.internalBinders[@type] or @view.binders[type] 27 unless @binder = @view.binders[type]
28 for identifier, value of @view.binders 28 for identifier, value of @view.binders
29 if identifier isnt '*' and identifier.indexOf('*') isnt -1 29 if identifier isnt '*' and identifier.indexOf('*') isnt -1
30 regexp = new RegExp "^#{identifier.replace('*', '.+')}$" 30 regexp = new RegExp "^#{identifier.replace('*', '.+')}$"
...@@ -642,15 +642,6 @@ Rivets.binders = ...@@ -642,15 +642,6 @@ Rivets.binders =
642 else 642 else
643 el.removeAttribute @type 643 el.removeAttribute @type
644 644
645 # Rivets.internalBinders
646 # ----------------------
647
648 # Contextually sensitive binders that are used outside of the standard attribute
649 # bindings. Put here for fast lookups and to prevent them from being overridden.
650 Rivets.internalBinders =
651 textNode: (node, value) ->
652 node.data = value ? ''
653
654 # Rivets.components 645 # Rivets.components
655 # ----------------- 646 # -----------------
656 647
......