diff options
author | Alexander Larsson <alexl@redhat.com> | 2017-11-30 14:47:08 +0100 |
---|---|---|
committer | Alexander Larsson <alexl@redhat.com> | 2017-11-30 21:57:42 +0100 |
commit | c30073793edcf373abf4fe31d6b51ec921bd2016 (patch) | |
tree | 7dfc3508c3cf48ea1be0e4058885b3eb9df8cbbe /gdk/broadway/broadway.js | |
parent | 521b09cc964346e1eb5c3c9241cc68bef42f860c (diff) | |
download | gtk+-c30073793edcf373abf4fe31d6b51ec921bd2016.tar.gz |
broadway: Improve logging
We now log backwards, so that the latest is always visible.
Also, we use <pre> with a smaller size.
Diffstat (limited to 'gdk/broadway/broadway.js')
-rw-r--r-- | gdk/broadway/broadway.js | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/gdk/broadway/broadway.js b/gdk/broadway/broadway.js index 5474960bc7..4e15ecd3ab 100644 --- a/gdk/broadway/broadway.js +++ b/gdk/broadway/broadway.js @@ -2,13 +2,14 @@ var logDiv = null; function log(str) { if (!logDiv) { - logDiv = document.createElement('div'); + logDiv = document.createElement('pre'); document.body.appendChild(logDiv); logDiv.style["position"] = "absolute"; logDiv.style["right"] = "0px"; + logDiv.style["font-size"] = "small"; } - logDiv.appendChild(document.createTextNode(str)); - logDiv.appendChild(document.createElement('br')); + logDiv.insertBefore(document.createElement('br'), logDiv.firstChild); + logDiv.insertBefore(document.createTextNode(str), logDiv.firstChild); } function getStackTrace() |