]> git.codecow.com Git - nano-pow.git/commitdiff
Document function parameters.
authorChris Duncan <chris@codecow.com>
Sun, 26 Jul 2026 07:24:29 +0000 (00:24 -0700)
committerChris Duncan <chris@codecow.com>
Sun, 26 Jul 2026 07:24:29 +0000 (00:24 -0700)
index.html

index eaa354a8adb80336e1aa97cff524274d2625fd2f..26f9828d09d9b5b5e655ed561f3c817698558f34 100644 (file)
@@ -46,6 +46,11 @@ SPDX-License-Identifier: GPL-3.0-or-later
                        return [...bytes].map(b => b.toString(16).padStart(2, '0')).join('')
                }
 
+               /**
+                * @param {number[]} times
+                * @param {string} type
+                * @param {number} effort
+                */
                function average (times, type, effort) {
                        const averages = stats(times)
                        const title = type === 'WebGPU'
@@ -245,6 +250,9 @@ SPDX-License-Identifier: GPL-3.0-or-later
                        logger.log('%TESTING COMPLETE', 'color:orange;font-weight:bold')
                }
 
+               /**
+                * @param {InputEvent} event
+                */
                function startValidation (event) {
                        const difficulty = document.getElementById('difficulty')?.value
                        const work = document.getElementById('work')?.value
@@ -277,6 +285,9 @@ SPDX-License-Identifier: GPL-3.0-or-later
                document.getElementById('hash').addEventListener('input', startValidation)
                document.getElementById('api').addEventListener('input', startValidation)
 
+               /**
+                * @param {InputEvent} event
+                */
                function startTest (event) {
                        event.target.disabled = true
                        const api = document.getElementById('api')