]> git.codecow.com Git - libnemo.git/commitdiff
Scroll test results as they are printed to test page.
authorChris Duncan <chris@zoso.dev>
Mon, 7 Jul 2025 15:28:51 +0000 (08:28 -0700)
committerChris Duncan <chris@zoso.dev>
Mon, 7 Jul 2025 15:28:51 +0000 (08:28 -0700)
index.html

index b1a75c6cbc59eedcf2768849d1108c51b91e7208..f193df59ced011b332ad0eecc1dc13c61338fa2f 100644 (file)
@@ -41,6 +41,7 @@ SPDX-License-Identifier: GPL-3.0-or-later
                                a = a.replace('%c', '<span style="font-weight:bold">')
                                output.innerHTML += `<pre>${a}</pre>`
                                consoleGroup(...args)
+                               window?.scrollTo(0, document.body.scrollHeight)
                        }
                        const consoleError = console.error
                        console.error = (...args) => {
@@ -48,6 +49,7 @@ SPDX-License-Identifier: GPL-3.0-or-later
                                a = a.replace('%cFAIL ,color:red,', '<span style="color:red">FAIL </span>')
                                output.innerHTML += `<pre>${a}</pre>`
                                consoleError(...args)
+                               window?.scrollTo(0, document.body.scrollHeight)
                        }
                        const consoleLog = console.log
                        console.log = (...args) => {
@@ -58,6 +60,7 @@ SPDX-License-Identifier: GPL-3.0-or-later
                                a = a.replace('%cTESTING COMPLETE,color:orange;font-weight:bold', '<span style="color:orange;font-weight:bold">TESTING COMPLETE</span>')
                                output.innerHTML += `<pre>${a}</pre>`
                                consoleLog(...args)
+                               window?.scrollTo(0, document.body.scrollHeight)
                        }
                })()
        </script>