From 5352858655487a6aa7e7f6202253e576c8039d82 Mon Sep 17 00:00:00 2001 From: Patrick Debois Date: Wed, 7 Nov 2012 11:42:11 +0100 Subject: [PATCH] ability to change parentElement of a terminal instead of document.body --- static/term.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/static/term.js b/static/term.js index f597e29b..047059b6 100644 --- a/static/term.js +++ b/static/term.js @@ -179,6 +179,7 @@ function Terminal(cols, rows, handler) { this.savedX; this.savedY; this.savedCols; + this.parentElement = document.body; // stream this.readable = true; @@ -340,7 +341,7 @@ Terminal.prototype.open = function() { this.children.push(div); } - document.body.appendChild(this.element); + this.parentElement.appendChild(this.element); this.refresh(0, this.rows - 1);