title: Synchronous loading of Base64-encoded images in Javascript
body: <p>I have a set of ~200 base64-encoded PNGs (all coming from a single shared JSON file) that I'd like to load directly in a loop as WebGL textures, without having to resort to callbacks/event handlers (for simpler code and less event handling overhead). Is there a way to do this in Javascript?</p>
  
  <p>I know that the canonical way to load base64-encoded images is via data URIs. But it seems that setting the <code>src</code> property of an <code>Image</code> object does not actually decode the image data, but only queues it for asynchronous loading (meaning that uploading the <code>Image</code> object as a WebGL texture right after setting the <code>src</code> property fails; setting an <code>onload</code> handler that uploads the texture succeeds).</p>