From 1398457f7aebaff793aba640cd2187d540833418 Mon Sep 17 00:00:00 2001 From: MoyuScript Date: Mon, 20 Jan 2014 22:42:58 +0200 Subject: [PATCH] Cache backgroundImages request for nodes --- src/nodecontainer.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/nodecontainer.js b/src/nodecontainer.js index 3468eb9..8ec9241 100644 --- a/src/nodecontainer.js +++ b/src/nodecontainer.js @@ -6,6 +6,7 @@ function NodeContainer(node, parent) { this.visible = null; this.computedStyles = null; this.styles = {}; + this.backgroundImages = null; } NodeContainer.prototype.assignStack = function(stack) { @@ -143,5 +144,5 @@ NodeContainer.prototype.parseBackgroundImages = function() { appendResult(); - return results; + return this.backgroundImages || (this.backgroundImages = results); };