code: function proxyGetImage(url, img, imageObj){
      var callback_name,
      scriptUrl = options.proxy,
      script;
  
      link.href = url;
      url = link.href; // work around for pages with base href="" set - WARNING: this may change the url
  
      callback_name = 'html2canvas_' + (count++);
      imageObj.callbackname = callback_name;
  
      if (scriptUrl.indexOf("?") > -1) {
        scriptUrl += "&";
      } else {
        scriptUrl += "?";
      }
      scriptUrl += 'url=' + encodeURIComponent(url) + '&callback=' + callback_name;
      script = doc.createElement("script");
  
      window[callback_name] = function(a){
        if (a.substring(0,6) === "error:"){
          imageObj.succeeded = false;
          images.numLoaded++;
          images.numFailed++;
          start();
        } else {
          setImageLoadHandlers(img, imageObj);
          img.src = a;
        }
        window[callback_name] = undefined; // to work with IE<9  // NOTE: that the undefined callback property-name still exists on the window object (for IE<9)
        try {
          delete window[callback_name];  // for all browser that support this
        } catch(ex) {}
        script.parentNode.removeChild(script);
        script = null;
        delete imageObj.script;
        delete imageObj.callbackname;
      };
  
      script.setAttribute("type", "text/javascript");
      script.setAttribute("src", scriptUrl);
      imageObj.script = script;
      window.document.body.appendChild(script);
  
    }
docs: TODO modify proxy to serve images with CORS enabled, where available