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); });