From 203febd7900fff40628840614f44ddb9b69e276f Mon Sep 17 00:00:00 2001 From: Brian Ressler Date: Sun, 4 Aug 2024 21:50:42 -0500 Subject: [PATCH] try another loop method for HTMLCollection --- _static/uicontrol.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/_static/uicontrol.js b/_static/uicontrol.js index 2163924a..28757632 100644 --- a/_static/uicontrol.js +++ b/_static/uicontrol.js @@ -5,10 +5,8 @@ function optimize_images() { console.log("Page Images:"); console.log(page_images); - for(let i = 0; i < page_images.length; i++) { - let current_image = page_images[i]; - - console.log("src: " + current_image.src + ", width: " + current_image.width + ", height: " + current_image.height); + for (image of page_images) { + console.log("src: " + image.src + ", width: " + image.width + ", height: " + image.height); } // if(page_images != null && page_images.length > 0) {