//https://developer.mozilla.org/en-US/docs/Web/Guide/DOM/Events/Creating_and_triggering_events
function triggerMouseup(elem) {
  var event = new MouseEvent('mouseup', {
    'view': window,
    'bubbles': true,
    'cancelable': true
  });
  (elem || document.body).dispatchEvent(event);
}
@@ -1,288 +1,586 @@
-//https://developer.mozilla.org/en-US/docs/Web/Guide/DOM/Events/Creating_and_triggering_events%0Afunction triggerMouseup(elem) %7B%0A  var event = new MouseEvent('mouseup', %7B%0A    'view': window,%0A    'bubbles': true,%0A    'cancelable': true%0A  %7D);%0A  (elem %7C%7C document.body).dispatchEvent(event);
+function triggerMouseup(elem) %7B%0A  fireEvent((elem %7C%7C document.body), 'mouseup')%0A%7D%0A%0A//http://stackoverflow.com/questions/827716/emulate-clicking-a-link-with-javascript-that-works-with-ie%0Afunction fireEvent(obj, evt) %7B%0A  var fireOnThis = obj;%0A  if (document.createEvent) %7B%0A    var evObj = document.createEvent(evt.indexOf('mouse') %3E -1 ? 'MouseEvents' : 'KeyboardEvent');%0A    evObj.initEvent(evt, true, false);%0A    fireOnThis.dispatchEvent(evObj);%0A%0A  %7D else if (document.createEventObject) %7B%0A    var evObj = document.createEventObject();%0A    fireOnThis.fireEvent('on' + evt, evObj);%0A  %7D
 %0A%7D

fix most tests in IE11 (29/32 pass now)