(type, args)
| 478 | } |
| 479 | |
| 480 | out(type, args) { |
| 481 | let wrap = document.createElement("pre") |
| 482 | wrap.className = "sandbox-output-" + type |
| 483 | for (let i = 0; i < args.length; ++i) { |
| 484 | let arg = args[i] |
| 485 | if (i) wrap.appendChild(document.createTextNode(" ")) |
| 486 | if (typeof arg == "string") |
| 487 | wrap.appendChild(document.createTextNode(arg)) |
| 488 | else |
| 489 | wrap.appendChild(represent(arg, 58)) |
| 490 | } |
| 491 | this.div.appendChild(wrap) |
| 492 | } |
| 493 | } |
| 494 | |
| 495 | function span(type, text) { |