domOutput.js 296 B

123456789101112131415
  1. import { Output } from './output';
  2. import $ from 'jquery';
  3. export class DOMOutput extends Output {
  4. constructor (selector) {
  5. super();
  6. this.el = $(selector);
  7. }
  8. sendOutput (text) {
  9. const line = $(`<span class='ivprog-io-output> ${text} </span>`);
  10. this.el.append(line);
  11. }
  12. }