What do you mean by limited functionality? Please do explain.
Edit: Also what do you mean by the already defined way? Electron was built upon CSS and JS, and there’s only one approach to events natively, and because that’s the only way to use native events, I don’t see what you mean by that.
var Container = document.getElementById("container");
if(e.which !== 2) return ;
alert("middle button pressed");
The above code works fine in every single browser I know (latest versions).
Edit #2: Using
document.onClick won’t work, the correct one is
document.onclick. and It’s DOM-1-styled events and are strongly discouraged.