1234567891011121314151617181920 |
- import { Output } from './output';
- export class DOMOutput extends Output {
- constructor (selector) {
- super();
- this.el = $(selector);
- }
- sendOutput (text) {
- text = text.replace("\n", '</br>');
- text = text.replace(/\t/g,'	');
- const span = $('<span />').addClass('ivprog-io-output-text').html(text);
- this.el.append(span);
- }
- clear () {
- this.el.empty();
- }
- }
|