diff options
author | Ben Boeckel <MathStuf@gmail.com> | 2011-04-14 22:58:05 -0400 |
---|---|---|
committer | Ben Boeckel <MathStuf@gmail.com> | 2011-04-14 22:58:05 -0400 |
commit | 1b171ea59fffa3df92aa4b3b1604c911a77b9c3a (patch) | |
tree | 5ae1a518c0573813d4a9601816322c467740cbff /examples | |
parent | 5931675528cd29642987512acbc08142d5699f6a (diff) |
Ignore errors when attaching labels
Diffstat (limited to 'examples')
-rw-r--r-- | examples/data/scripts/follow.js | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/examples/data/scripts/follow.js b/examples/data/scripts/follow.js index 22175ca..782b1d1 100644 --- a/examples/data/scripts/follow.js +++ b/examples/data/scripts/follow.js @@ -178,9 +178,13 @@ uzbl.follow.reDrawHints = function(elems, chars) { elements.forEach(function(el, i) { var label = labels[i]; var pos = positions[i]; - var doc = uzbl.follow.getDocument(el); - var h = uzbl.follow.generateHint(doc, el, label, pos[0], pos[1]); - doc.hintdiv.appendChild(h); + try { + var doc = uzbl.follow.getDocument(el); + var h = uzbl.follow.generateHint(doc, el, label, pos[0], pos[1]); + doc.hintdiv.appendChild(h); + } catch (err) { + // Unable to attach label -> shrug it off and continue + } }); } |