(context, { root: rootVal, target })
| 4316 | return parser.parseElement("indirectExpression", result); |
| 4317 | } |
| 4318 | resolve(context, { root: rootVal, target }) { |
| 4319 | if (rootVal == null) return []; |
| 4320 | var returnArr = []; |
| 4321 | if (rootVal.css) { |
| 4322 | context.meta.runtime.implicitLoop(target, function(targetElt) { |
| 4323 | var results = context.meta.runtime.resolveQuery(targetElt, rootVal.css); |
| 4324 | for (var i = 0; i < results.length; i++) { |
| 4325 | returnArr.push(results[i]); |
| 4326 | } |
| 4327 | }); |
| 4328 | } else if (rootVal instanceof Element) { |
| 4329 | var within = false; |
| 4330 | context.meta.runtime.implicitLoop(target, function(targetElt) { |
| 4331 | if (targetElt.contains(rootVal)) { |
| 4332 | within = true; |
| 4333 | } |
| 4334 | }); |
| 4335 | if (within) { |
| 4336 | return rootVal; |
| 4337 | } |
| 4338 | } else { |
| 4339 | context.meta.runtime.implicitLoop(rootVal, function(rootElt) { |
| 4340 | context.meta.runtime.implicitLoop(target, function(targetElt) { |
| 4341 | if (rootElt === targetElt) { |
| 4342 | returnArr.push(rootElt); |
| 4343 | } |
| 4344 | }); |
| 4345 | }); |
| 4346 | } |
| 4347 | return returnArr; |
| 4348 | } |
| 4349 | get lhs() { |
| 4350 | return { root: this.root, target: this.target }; |
| 4351 | } |
no test coverage detected