Update templates/TestingMeasurement.html
Browse files
templates/TestingMeasurement.html
CHANGED
|
@@ -2211,26 +2211,26 @@ function updateDropdown(options) {
|
|
| 2211 |
}
|
| 2212 |
|
| 2213 |
// Function to start the worker and periodic updates
|
| 2214 |
-
function startDropdownUpdates() {
|
| 2215 |
-
|
| 2216 |
-
|
| 2217 |
-
|
| 2218 |
-
|
| 2219 |
-
|
| 2220 |
-
|
| 2221 |
-
|
| 2222 |
-
|
| 2223 |
-
|
| 2224 |
-
|
| 2225 |
|
| 2226 |
-
|
| 2227 |
-
|
| 2228 |
|
| 2229 |
-
|
| 2230 |
-
|
| 2231 |
-
|
| 2232 |
-
|
| 2233 |
-
}
|
| 2234 |
|
| 2235 |
|
| 2236 |
|
|
|
|
| 2211 |
}
|
| 2212 |
|
| 2213 |
// Function to start the worker and periodic updates
|
| 2214 |
+
// function startDropdownUpdates() {
|
| 2215 |
+
// const guessedNamesWorker = new Worker('../static/guessedNamesWorker.js');
|
| 2216 |
+
// // Handle messages from the worker
|
| 2217 |
+
// guessedNamesWorker.onmessage = function (event) {
|
| 2218 |
+
// if (event.data.status === 'success') {
|
| 2219 |
+
// console.log('Updating dropdown with new data:', event.data.data);
|
| 2220 |
+
// updateDropdown(event.data.data); // Update the dropdown
|
| 2221 |
+
// } else {
|
| 2222 |
+
// console.error('Error from worker:', event.data.error);
|
| 2223 |
+
// }
|
| 2224 |
+
// };
|
| 2225 |
|
| 2226 |
+
// // Send an initial fetch message to the worker
|
| 2227 |
+
// guessedNamesWorker.postMessage('fetch');
|
| 2228 |
|
| 2229 |
+
// // Periodically fetch data every 3 seconds
|
| 2230 |
+
// setInterval(() => {
|
| 2231 |
+
// guessedNamesWorker.postMessage('fetch');
|
| 2232 |
+
// }, 3000);
|
| 2233 |
+
// }
|
| 2234 |
|
| 2235 |
|
| 2236 |
|