Must an element be visible in order to “load” event listener to work?
问题 In my document, there are two svg images: the preview and the result. The result image is computed based on the preview image; I switch between them by adding/removing class hidden-display , which is further affected by css like this: .hidden-display { display: none; } This seems to be working well. While the result image is being computed, I want to hide the preview image and show only a progress bar; once the result image is loaded, I want it to be displayed and hide the progress bar. Here