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
// Load a cross-origin image (using CORS). | |
// This continually updates an `img` element's `src` until an image's | |
// data URI has changed. | |
function loadExternalImage(uri, throbberUri) { | |
var canvas = document.createElement('canvas'); | |
var ctx = canvas.getContext('2d'); | |
var img = document.createElement('img'); |