(target, source, installArgs, runtime2)
| 9729 | this.behaviorArgs = args; |
| 9730 | } |
| 9731 | install(target, source, installArgs, runtime2) { |
| 9732 | var ctx = runtime2.makeContext(target, this, target, null); |
| 9733 | var behaviorArgs = this.behaviorArgs ? this.behaviorArgs.evaluate(ctx) : null; |
| 9734 | var behavior = runtime2.globalScope; |
| 9735 | for (var i = 0; i < this.behaviorNamespace.length; i++) { |
| 9736 | behavior = behavior[this.behaviorNamespace[i]]; |
| 9737 | if (typeof behavior !== "object" && typeof behavior !== "function") |
| 9738 | throw new Error("No such behavior defined as " + this.behaviorPath); |
| 9739 | } |
| 9740 | if (!(behavior instanceof Function)) |
| 9741 | throw new Error(this.behaviorPath + " is not a behavior"); |
| 9742 | behavior(target, source, behaviorArgs); |
| 9743 | } |
| 9744 | static parse(parser) { |
| 9745 | if (!parser.matchToken("install")) return; |
| 9746 | var behaviorPath = parser.requireElement("dotOrColonPath").evalStatically(); |
nothing calls this directly
no test coverage detected