auto-scroll console
This commit is contained in:
parent
0d683f1538
commit
2b6f9a65d8
@ -102,32 +102,38 @@ export class PlaygroundConsole {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#addTopLevelEntry(entryType, ...args) {
|
||||||
|
this.#addEntry(entryType, "", this.elem, ...args);
|
||||||
|
|
||||||
|
this.elem.scrollTop = this.elem.scrollHeight;
|
||||||
|
}
|
||||||
|
|
||||||
addInput() {
|
addInput() {
|
||||||
this.#addEntry("input", "", this.elem, ...arguments);
|
this.#addTopLevelEntry("input", ...arguments);
|
||||||
}
|
}
|
||||||
|
|
||||||
log() {
|
log() {
|
||||||
this.#addEntry("log", "", this.elem, ...arguments);
|
this.#addTopLevelEntry("log", ...arguments);
|
||||||
}
|
}
|
||||||
|
|
||||||
dir() {
|
dir() {
|
||||||
this.#addEntry("dir", "", this.elem, ...arguments);
|
this.#addTopLevelEntry("dir", ...arguments);
|
||||||
}
|
}
|
||||||
|
|
||||||
debug() {
|
debug() {
|
||||||
this.#addEntry("debug", "", this.elem, ...arguments);
|
this.#addTopLevelEntry("debug", ...arguments);
|
||||||
}
|
}
|
||||||
|
|
||||||
info() {
|
info() {
|
||||||
this.#addEntry("info", "", this.elem, ...arguments);
|
this.#addTopLevelEntry("info", ...arguments);
|
||||||
}
|
}
|
||||||
|
|
||||||
warn() {
|
warn() {
|
||||||
this.#addEntry("warn", "", this.elem, ...arguments);
|
this.#addTopLevelEntry("warn", ...arguments);
|
||||||
}
|
}
|
||||||
|
|
||||||
error() {
|
error() {
|
||||||
this.#addEntry("error", "", this.elem, ...arguments);
|
this.#addTopLevelEntry("error", ...arguments);
|
||||||
}
|
}
|
||||||
|
|
||||||
clear() {
|
clear() {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user