(target, source, installArgs, runtime2)
| 9276 | this.behaviorArgs = args; |
| 9277 | } |
| 9278 | install(target, source, installArgs, runtime2) { |
| 9279 | var ctx = runtime2.makeContext(target, this, target, null); |
| 9280 | var behaviorArgs = this.behaviorArgs ? this.behaviorArgs.evaluate(ctx) : null; |
| 9281 | var behavior = runtime2.globalScope; |
| 9282 | for (var i = 0; i < this.behaviorNamespace.length; i++) { |
| 9283 | behavior = behavior[this.behaviorNamespace[i]]; |
| 9284 | if (typeof behavior !== "object" && typeof behavior !== "function") |
| 9285 | throw new Error("No such behavior defined as " + this.behaviorPath); |
| 9286 | } |
| 9287 | if (!(behavior instanceof Function)) |
| 9288 | throw new Error(this.behaviorPath + " is not a behavior"); |
| 9289 | behavior(target, source, behaviorArgs); |
| 9290 | } |
| 9291 | static parse(parser) { |
| 9292 | if (!parser.matchToken("install")) return; |
| 9293 | var behaviorPath = parser.requireElement("dotOrColonPath").evalStatically(); |
nothing calls this directly
no test coverage detected