3 Replies Latest reply on Jul 29, 2015 3:50 AM by kglad

    JS - find out what mouse button was clicked / get event refrence from a .bind click

    Lachlan D Level 1

      Looking for a way on mouse click to tell if it was a left or right click.

      This triggers on both left and right:


      this.clickthrough_btn.addEventListener("click", clickThroughFunc.bind(this));

      function clickThroughFunc(){




      It should involve something from this:

      Mouse events | JavaScript Tutorial


      Which mentions the W3C button property, but I don't know of a way to get the event from the click when the button has been .bind