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.
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!
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.