Skip to content

Commit 6ef6c79

Browse files
committed
todo update proxy
1 parent 3ad49ef commit 6ef6c79

2 files changed

Lines changed: 3 additions & 36 deletions

File tree

readme.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,8 @@ For more information and examples, please visit the <a href="http://html2canvas.
3838
### Changelog ###
3939

4040
v0.33 -
41-
* Added support for CORS images and option to create canvas as tainted (<a href="#">niklasvh</a>)
41+
42+
* Added support for CORS images and option to create canvas as tainted (<a href="https://github.com/niklasvh/html2canvas/commit/3ad49efa0032cde25c6ed32a39e35d1505d3b2ef">niklasvh</a>)
4243
* Improved minification saved ~1K! (<a href="https://github.com/cobexer/html2canvas/commit/b82be022b2b9240bd503e078ac980bde2b953e43">cobexer</a>)
4344
* Added integrated support for Flashcanvas (<a href="https://github.com/niklasvh/html2canvas/commit/e9257191519f67d74fd5e364d8dee3c0963ba5fc">niklasvh</a>)
4445
* Fixed a variety of legacy IE bugs (<a href="https://github.com/niklasvh/html2canvas/commit/b65357c55d0701017bafcd357bc654b54d458f8f">niklasvh</a>)

src/Preload.js

Lines changed: 1 addition & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ html2canvas.Preload = function(element, opts){
6666
}
6767
}
6868

69+
// TODO modify proxy to serve images with CORS enabled, where available
6970
function proxyGetImage(url, img, imageObj){
7071
var callback_name,
7172
scriptUrl = options.proxy,
@@ -110,41 +111,6 @@ html2canvas.Preload = function(element, opts){
110111
imageObj.script = script;
111112
window.document.body.appendChild(script);
112113

113-
/*
114-
115-
// enable xhr2 requests where available (no need for base64 / json)
116-
117-
$.ajax({
118-
data:{
119-
xhr2:false,
120-
url:url
121-
},
122-
url: options.proxy,
123-
dataType: "jsonp",
124-
success: function(a){
125-
126-
if (a.substring(0,6) === "error:"){
127-
images.splice(getIndex(images, url), 2);
128-
start();
129-
}else{
130-
img.onload = function(){
131-
imagesLoaded+=1;
132-
start();
133-
134-
};
135-
img.src = a;
136-
}
137-
138-
139-
},
140-
error: function(){
141-
images.splice(getIndex(images, url), 2);
142-
start();
143-
}
144-
145-
146-
});
147-
*/
148114
}
149115

150116
function getImages (el) {

0 commit comments

Comments
 (0)