From 6b65188b7a4a21ae1e575282fd5b6198b22ca7b7 Mon Sep 17 00:00:00 2001 From: Valerio Virgillito Date: Thu, 10 May 2012 15:07:52 -0700 Subject: Fixing the live preview for the new document. Signed-off-by: Valerio Virgillito --- js/lib/NJUtils.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'js/lib/NJUtils.js') diff --git a/js/lib/NJUtils.js b/js/lib/NJUtils.js index 5aaeb5f2..d0f547f5 100755 --- a/js/lib/NJUtils.js +++ b/js/lib/NJUtils.js @@ -18,8 +18,9 @@ exports.NJUtils = Montage.create(Component, { ///// Quick "getElementById" $ : { - value: function(id) { - return document.getElementById(id); + value: function(id, doc) { + var _doc = doc || document; + return _doc.getElementById(id); } }, -- cgit v1.2.3