(binding, scope, lookupFunctions)
| 48 | } |
| 49 | |
| 50 | bind(binding, scope, lookupFunctions) { |
| 51 | if (this.expression.expression && this.expression.bind) { |
| 52 | this.expression.bind(binding, scope, lookupFunctions); |
| 53 | } |
| 54 | let behavior = lookupFunctions.bindingBehaviors(this.name); |
| 55 | if (!behavior) { |
| 56 | throw new Error(`No BindingBehavior named "${this.name}" was found!`); |
| 57 | } |
| 58 | let behaviorKey = `behavior-${this.name}`; |
| 59 | if (binding[behaviorKey]) { |
| 60 | throw new Error(`A binding behavior named "${this.name}" has already been applied to "${this.expression}"`); |
| 61 | } |
| 62 | binding[behaviorKey] = behavior; |
| 63 | behavior.bind.apply(behavior, [binding, scope].concat(evalList(scope, this.args, binding.lookupFunctions))); |
| 64 | } |
| 65 | |
| 66 | unbind(binding, scope) { |
| 67 | let behaviorKey = `behavior-${this.name}`; |
nothing calls this directly
no test coverage detected