boostorg / website-v2

New Boost website
https://boost.io
Boost Software License 1.0
8 stars 13 forks source link

ValidateGitImages is buggy #1438

Closed gavinwahl closed 1 week ago

gavinwahl commented 1 week ago

in libraries/detail.html, ValidateGitImages index is the index of the image when the document was loaded. Then, onerror removes images from the document, invalidating all existing indexes. This results in the wrong images being removed when there is more than one broken image on a page.

document.getElementsByTagName returns "a live HTMLCollection of elements", meaning its contents change when the document changes and indexes into it can not be used across document modifications.

gavinwahl commented 1 week ago

At https://www.stage.boost.cppalliance.org/libraries/algorithm/:

Image

rbbeeston commented 1 week ago

Gavin, you are welcome to take a stab at this. Basically the goal is to remove any broken image icons, Vanilla javascript. If you have a better solution, we'll take it!