add: linkNode = event.originalTarget; 
context:   function hrefForClickEvent(event)  {    var target = event.target;    var linkNode;    var isKeyPress = (event.type == "keypress");    if ( target instanceof HTMLAnchorElement ||         target instanceof HTMLAreaElement   ||         target instanceof HTMLLinkElement ) {      if (target.hasAttribute("href"))         linkNode = target;    }    else if ( target instanceof HTMLInputElement            && (event.target.type == "text") // text field            && !isKeyPress       // not a key event            && event.detail == 2 // double click            && event.button == 0 // left mouse button            && event.target.value.length == 0 // no text has been entered            && "@mozilla.org/wallet/wallet-service;1" in Components.classes // wallet is available    ) {      prefillTextBox(target); // prefill the empty text field if possible    }    else {      while (linkNode && !(linkNode instanceof HTMLAnchorElement))        linkNode = linkNode.parentNode;      // <a> cannot be nested.  So if we find an anchor without an      // href, there is no useful <a> around the target      if (linkNode && !linkNode.hasAttribute("href"))        linkNode = null;    }    var href;    if (linkNode) {      href = new XPCNativeWrapper(linkNode, "href").href;    } else {      // Try simple XLink      linkNode = target;      while (linkNode) {        if (linkNode.nodeType == Node.ELEMENT_NODE) {          var wrapper = new XPCNativeWrapper(linkNode, "getAttributeNS()");          href = wrapper.getAttributeNS("http://www.w3.org/1999/xlink", "href");          break;        }        linkNode = linkNode.parentNode;      }      if (href && href != "") {        var baseURI = new XPCNativeWrapper(linkNode, "baseURI").baseURI;        href = makeURLAbsolute(baseURI, href);      }    }    return href;  }
meta: 8395	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/8395/7383a8381121a765a50555a8c3054abf2eec66d7/contentAreaClick.js/buggy/xpfe/communicator/resources/content/contentAreaClick.js