From b3009797dae0ace031be5cc5bdaa13d1e343e604 Mon Sep 17 00:00:00 2001 From: Kris Maglione Date: Thu, 27 Nov 2008 05:43:33 +0000 Subject: [PATCH] Fix hints in documents with SVG images, and other corner cases. --- content/hints.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/content/hints.js b/content/hints.js index 113d0a34..3bba6a7b 100644 --- a/content/hints.js +++ b/content/hints.js @@ -156,8 +156,11 @@ function Hints() //{{{ pageHints.push([elem, text, span, null, elem.style.backgroundColor, elem.style.color]); } - doc.body.appendChild(fragment); - docs.push({ doc: doc, start: start, end: pageHints.length - 1 }); + if (doc.body) + { + doc.body.appendChild(fragment); + docs.push({ doc: doc, start: start, end: pageHints.length - 1 }); + } // also generate hints for frames Array.forEach(win.frames, function (frame) { generate(frame); });