Created
June 3, 2019 07:30
-
-
Save fredj/259aaca87d175f03c102a52e6dc2c994 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| const img = new Image(); | |
| img.src = 'https://unpkg.com/@mapbox/[email protected]/icons/fuel-15.svg'; | |
| img.decode() | |
| .then(() => { | |
| console.log('loaded'); | |
| }) | |
| .catch(() => { | |
| console.log('error'); | |
| }); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment