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() {
|
||||
this.#addEntry("input", "", this.elem, ...arguments);
|
||||
this.#addTopLevelEntry("input", ...arguments);
|
||||
}
|
||||
|
||||
log() {
|
||||
this.#addEntry("log", "", this.elem, ...arguments);
|
||||
this.#addTopLevelEntry("log", ...arguments);
|
||||
}
|
||||
|
||||
dir() {
|
||||
this.#addEntry("dir", "", this.elem, ...arguments);
|
||||
this.#addTopLevelEntry("dir", ...arguments);
|
||||
}
|
||||
|
||||
debug() {
|
||||
this.#addEntry("debug", "", this.elem, ...arguments);
|
||||
this.#addTopLevelEntry("debug", ...arguments);
|
||||
}
|
||||
|
||||
info() {
|
||||
this.#addEntry("info", "", this.elem, ...arguments);
|
||||
this.#addTopLevelEntry("info", ...arguments);
|
||||
}
|
||||
|
||||
warn() {
|
||||
this.#addEntry("warn", "", this.elem, ...arguments);
|
||||
this.#addTopLevelEntry("warn", ...arguments);
|
||||
}
|
||||
|
||||
error() {
|
||||
this.#addEntry("error", "", this.elem, ...arguments);
|
||||
this.#addTopLevelEntry("error", ...arguments);
|
||||
}
|
||||
|
||||
clear() {
|
||||
|
Loading…
x
Reference in New Issue
Block a user