We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 16022b8 commit 8d3a0c2Copy full SHA for 8d3a0c2
src/Core.js
@@ -8,6 +8,8 @@
8
"use strict";
9
10
var _html2canvas = {},
11
+previousElement,
12
+computedCSS,
13
html2canvas;
14
15
@@ -106,7 +108,10 @@ _html2canvas.Util.getCSS = function (el, attribute) {
106
108
107
109
110
if ( window.getComputedStyle ) {
- val = document.defaultView.getComputedStyle(el, null)[ attribute ];
111
+ if ( previousElement !== el ) {
112
+ computedCSS = document.defaultView.getComputedStyle(el, null);
113
+ }
114
+ val = computedCSS[ attribute ];
115
116
if ( attribute === "backgroundPosition" ) {
117
0 commit comments