(context, { root: rootVal, target })
| 4007 | return parser.parseElement("indirectExpression", inExpression); |
| 4008 | } |
| 4009 | resolve(context, { root: rootVal, target }) { |
| 4010 | if (rootVal == null) return []; |
| 4011 | var returnArr = []; |
| 4012 | if (rootVal.css) { |
| 4013 | context.meta.runtime.implicitLoop(target, function(targetElt) { |
| 4014 | var results = targetElt.querySelectorAll(rootVal.css); |
| 4015 | for (var i = 0; i < results.length; i++) { |
| 4016 | returnArr.push(results[i]); |
| 4017 | } |
| 4018 | }); |
| 4019 | } else if (rootVal instanceof Element) { |
| 4020 | var within = false; |
| 4021 | context.meta.runtime.implicitLoop(target, function(targetElt) { |
| 4022 | if (targetElt.contains(rootVal)) { |
| 4023 | within = true; |
| 4024 | } |
| 4025 | }); |
| 4026 | if (within) { |
| 4027 | return rootVal; |
| 4028 | } |
| 4029 | } else { |
| 4030 | context.meta.runtime.implicitLoop(rootVal, function(rootElt) { |
| 4031 | context.meta.runtime.implicitLoop(target, function(targetElt) { |
| 4032 | if (rootElt === targetElt) { |
| 4033 | returnArr.push(rootElt); |
| 4034 | } |
| 4035 | }); |
| 4036 | }); |
| 4037 | } |
| 4038 | return returnArr; |
| 4039 | } |
| 4040 | get lhs() { |
| 4041 | return { root: this.root, target: this.target }; |
| 4042 | } |
no test coverage detected