(context, root, prop, valueToPut)
| 6329 | return new _PutCommand(target, operation, value, rootExpr); |
| 6330 | } |
| 6331 | putInto(context, root, prop, valueToPut) { |
| 6332 | if (root == null) { |
| 6333 | var value = context.meta.runtime.resolveSymbol(prop, context); |
| 6334 | } else { |
| 6335 | var value = root; |
| 6336 | } |
| 6337 | if ((root == null || prop == null) && (value instanceof Element || value instanceof Document)) { |
| 6338 | while (value.firstChild) value.removeChild(value.firstChild); |
| 6339 | value.append(context.meta.runtime.convertValue(valueToPut, "Fragment")); |
| 6340 | context.meta.runtime.processNode(value); |
| 6341 | } else { |
| 6342 | if (root == null) { |
| 6343 | context.meta.runtime.setSymbol(prop, context, null, valueToPut); |
| 6344 | } else { |
| 6345 | root[prop] = valueToPut; |
| 6346 | } |
| 6347 | } |
| 6348 | } |
| 6349 | resolve(context, { root, prop, value: valueToPut }) { |
| 6350 | if (this.symbolWrite) { |
| 6351 | this.putInto(context, root, prop, valueToPut); |
no test coverage detected