(context, root, prop, valueToPut)
| 6686 | return new _PutCommand(target, operation, value, rootExpr); |
| 6687 | } |
| 6688 | putInto(context, root, prop, valueToPut) { |
| 6689 | if (root == null) { |
| 6690 | var value = context.meta.runtime.resolveSymbol(prop, context); |
| 6691 | } else { |
| 6692 | var value = root; |
| 6693 | } |
| 6694 | if ((root == null || prop == null) && (value instanceof Element || value instanceof Document)) { |
| 6695 | while (value.firstChild) value.removeChild(value.firstChild); |
| 6696 | value.append(context.meta.runtime.convertValue(valueToPut, "Fragment")); |
| 6697 | context.meta.runtime.processNode(value); |
| 6698 | } else { |
| 6699 | if (root == null) { |
| 6700 | context.meta.runtime.setSymbol(prop, context, null, valueToPut); |
| 6701 | } else { |
| 6702 | root[prop] = valueToPut; |
| 6703 | } |
| 6704 | } |
| 6705 | } |
| 6706 | resolve(context, { root, prop, value: valueToPut }) { |
| 6707 | if (this.symbolWrite) { |
| 6708 | this.putInto(context, root, prop, valueToPut); |
no test coverage detected