mirror of
https://github.com/niklasvh/html2canvas.git
synced 2023-08-10 21:13:10 +03:00
fix origin check in IE
This commit is contained in:
parent
2a3d6a0a35
commit
4aba46e247
@ -12,7 +12,7 @@ html2canvas.Preload = function(element, opts){
|
||||
"proxy": "http://html2canvas.appspot.com/"
|
||||
},
|
||||
images = [],
|
||||
pageOrigin = window.location.protocol + window.location.host,
|
||||
pageOrigin,
|
||||
imagesLoaded = 0,
|
||||
methods,
|
||||
i,
|
||||
@ -22,6 +22,8 @@ html2canvas.Preload = function(element, opts){
|
||||
imgLen = domImages.length,
|
||||
link = doc.createElement("a");
|
||||
|
||||
link.href = window.location.href;
|
||||
pageOrigin = link.protocol + link.host;
|
||||
opts = opts || {};
|
||||
|
||||
options = html2canvas.Util.Extend(opts, options);
|
||||
@ -32,8 +34,8 @@ html2canvas.Preload = function(element, opts){
|
||||
|
||||
function isSameOrigin(url){
|
||||
link.href = url;
|
||||
return ((link.protocol + link.host) === pageOrigin);
|
||||
|
||||
var origin = link.protocol + link.host;
|
||||
return ":" === origin || (origin === pageOrigin);
|
||||
}
|
||||
|
||||
function getIndex(array,src){
|
||||
|
Loading…
Reference in New Issue
Block a user