Merge branch 'arrix-child_textnodes' into develop

This commit is contained in:
Niklas von Hertzen
2013-08-04 14:36:55 +03:00
3 changed files with 30 additions and 3 deletions

View File

@ -1077,8 +1077,12 @@ _html2canvas.Parse = function (images, options) {
function init() {
var stack = renderElement(element, null);
Array.prototype.slice.call(element.children, 0).forEach(function(childElement) {
parseElement(childElement, stack);
_html2canvas.Util.Children(element).forEach(function(node) {
if (node.nodeType === 1) {
parseElement(node, stack);
} else if (node.nodeType === 3) {
renderText(element, node, stack);
}
});
stack.backgroundColor = getCSS(document.documentElement, "backgroundColor");