document.addEventListener('mouseup', function (e) {
  var ws = null;
  var el = e.srcElement;

  while (ws == null && el && el.getAttribute) {
    ws = el.getAttribute("wicketsource");
    el = el.parentNode;
  }
  chrome.extension.sendRequest({
    wicketsource: ws
  });
});

@@ -79,17 +79,13 @@
 = e.
-srcElemen
+targe
 t;%0A%0A

Use target attribute instead of srcElement