From 1b171ea59fffa3df92aa4b3b1604c911a77b9c3a Mon Sep 17 00:00:00 2001 From: Ben Boeckel Date: Thu, 14 Apr 2011 22:58:05 -0400 Subject: Ignore errors when attaching labels --- examples/data/scripts/follow.js | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'examples/data') 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 + } }); } -- cgit v1.2.3