From 9cab152e64dcfa0aa905ab87aed9a7090911cf2e Mon Sep 17 00:00:00 2001 From: MoyuScript Date: Wed, 23 Nov 2011 13:59:33 +0100 Subject: [PATCH] fix permission denied access on inner iFrame (crossDomain) --- src/Core.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/Core.js b/src/Core.js index cf3524b..0600ac3 100644 --- a/src/Core.js +++ b/src/Core.js @@ -128,5 +128,12 @@ html2canvas.Util.Extend = function (options, defaults) { html2canvas.Util.Children = function(el) { // $(el).contents() !== el.childNodes, Opera / IE have issues with that - return $(el).contents(); + var children; + try { + children = $(el).contents(); + } catch (ex) { + html2canvas.log("html2canvas.Util.Children failed with exception: " + ex.message); + children = []; + } + return children; }