Skip to content

Commit 383c64b

Browse files
authored
Revert "removed replaceNode"
1 parent 3f053ad commit 383c64b

File tree

5 files changed

+13
-11
lines changed

5 files changed

+13
-11
lines changed

dist/html2canvas.js

+4-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
html2canvas 0.5.0-beta4 <http://html2canvas.hertzen.com>
33
Copyright (c) 2017 Niklas von Hertzen
4-
2017-12-28 Custom build by Erik Koopmans, featuring latest bugfixes and features
4+
2017-06-14 Custom build by Erik Koopmans, featuring latest bugfixes and features
55
66
Released under MIT License
77
*/
@@ -641,9 +641,10 @@ module.exports = function(ownerDocument, containerDocument, width, height, optio
641641
};
642642

643643
documentClone.open();
644+
documentClone.write("<!DOCTYPE html><html></html>");
644645
// Chrome scrolls the parent document for some reason after the write to the cloned window???
645646
restoreOwnerScroll(ownerDocument, x, y);
646-
documentClone.write(documentElement.outerHTML);
647+
documentClone.replaceChild(documentClone.adoptNode(documentElement), documentClone.documentElement);
647648
documentClone.close();
648649
});
649650
};
@@ -3714,4 +3715,4 @@ function XHR(url) {
37143715
module.exports = XHR;
37153716

37163717
},{}]},{},[4])(4)
3717-
});
3718+
});

dist/html2canvas.min.js

+3-3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/html2canvas.svg.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
/*
22
html2canvas 0.5.0-beta4 <http://html2canvas.hertzen.com>
33
Copyright (c) 2017 Niklas von Hertzen
4-
2017-12-28 Custom build by Erik Koopmans, featuring latest bugfixes and features
4+
2017-06-14 Custom build by Erik Koopmans, featuring latest bugfixes and features
55
66
Released under MIT License
77
*/
88

9-
(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({},{},[])
9+
(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({},{},[])

dist/html2canvas.svg.min.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
/*
22
html2canvas 0.5.0-beta4 <http://html2canvas.hertzen.com>
33
Copyright (c) 2017 Niklas von Hertzen
4-
2017-12-28 Custom build by Erik Koopmans, featuring latest bugfixes and features
4+
2017-06-14 Custom build by Erik Koopmans, featuring latest bugfixes and features
55
66
Released under MIT License
77
*/
8-
!function a(b,c,d){function e(g,h){if(!c[g]){if(!b[g]){var i="function"==typeof require&&require;if(!h&&i)return i(g,!0);if(f)return f(g,!0);var j=new Error("Cannot find module '"+g+"'");throw j.code="MODULE_NOT_FOUND",j}var k=c[g]={exports:{}};b[g][0].call(k.exports,function(a){var c=b[g][1][a];return e(c?c:a)},k,k.exports,a,b,c,d)}return c[g].exports}for(var f="function"==typeof require&&require,g=0;g<d.length;g++)e(d[g]);return e}({},{},[]);
8+
!function a(b,c,d){function e(g,h){if(!c[g]){if(!b[g]){var i="function"==typeof require&&require;if(!h&&i)return i(g,!0);if(f)return f(g,!0);var j=new Error("Cannot find module '"+g+"'");throw j.code="MODULE_NOT_FOUND",j}var k=c[g]={exports:{}};b[g][0].call(k.exports,function(a){var c=b[g][1][a];return e(c?c:a)},k,k.exports,a,b,c,d)}return c[g].exports}for(var f="function"==typeof require&&require,g=0;g<d.length;g++)e(d[g]);return e}({},{},[]);

src/clone.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -95,9 +95,10 @@ module.exports = function(ownerDocument, containerDocument, width, height, optio
9595
};
9696

9797
documentClone.open();
98+
documentClone.write("<!DOCTYPE html><html></html>");
9899
// Chrome scrolls the parent document for some reason after the write to the cloned window???
99100
restoreOwnerScroll(ownerDocument, x, y);
100-
documentClone.write(documentElement.outerHTML);
101+
documentClone.replaceChild(documentClone.adoptNode(documentElement), documentClone.documentElement);
101102
documentClone.close();
102103
});
103104
};

0 commit comments

Comments
 (0)