-
Notifications
You must be signed in to change notification settings - Fork 339
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use one SVG image and track loaded state w/ flag
Instead of creating a new image every time `setSVG` is called and checking whether that image is complete with `loaded`, reuse the same image, override its `src`, & use `onload` instead of `addEventListener` to replace the previous event listener. This is necessary to avoid race conditions with the `_svgImageLoaded` flag.
- Loading branch information
1 parent
801b0da
commit 7af5b3e
Showing
1 changed file
with
10 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters