mirror of
https://github.com/niklasvh/html2canvas.git
synced 2023-08-10 21:13:10 +03:00
IE origin fix
This commit is contained in:
commit
1c6469d29b
@ -27,6 +27,8 @@ html2canvas.Preload = function(element, opts){
|
|||||||
imgLen = domImages.length,
|
imgLen = domImages.length,
|
||||||
link = doc.createElement("a");
|
link = doc.createElement("a");
|
||||||
|
|
||||||
|
link.href = window.location.href;
|
||||||
|
pageOrigin = link.protocol + link.host;
|
||||||
opts = opts || {};
|
opts = opts || {};
|
||||||
|
|
||||||
options = html2canvas.Util.Extend(opts, options);
|
options = html2canvas.Util.Extend(opts, options);
|
||||||
@ -37,8 +39,8 @@ html2canvas.Preload = function(element, opts){
|
|||||||
|
|
||||||
function isSameOrigin(url){
|
function isSameOrigin(url){
|
||||||
link.href = url;
|
link.href = url;
|
||||||
return ((link.protocol + link.host) === pageOrigin);
|
var origin = link.protocol + link.host;
|
||||||
|
return ":" === origin || (origin === pageOrigin);
|
||||||
}
|
}
|
||||||
|
|
||||||
function start(){
|
function start(){
|
||||||
|
Loading…
Reference in New Issue
Block a user