code: function( e, rightclick )
          {
              // http://www.quirksmode.org/js/events_properties.html
              if( !e )
                  var e = window.event;
              // mouse position
              var clientX = null,
                  clientY = null;
              if( e.clientX && e.clientY )
              {
                  clientX = e.clientX;
                  clientY = e.clientY;
              }
              else if( e.pageX && e.pageY )
              {
                  clientX = e.pageX - window.pageXOffset;
                  clientY = e.pageY - window.pageYOffset;
              }
              // mouse button
              if( e.which && e.which == 3 )
                  rightclick = true;
              else if( e.button && e.button == 2 )
                  rightclick = true;
  
              // remove event handler
              removeEvent( window_ie8, 'mouseup', mouseHandler );
              // Callback selection
              popup_saved_selection = null;
              if( ! option_hijackcontextmenu && rightclick )
                  return ;
              if( debounced_handleSelection )
                  debounced_handleSelection( clientX, clientY, rightclick );
          }
docs: Mouse events