I am calling a function like the one below by click on divs with a certain class.
Is there a way I can check when starting the function if a user is using Internet
This is how the Angularjs team is doing it (v 1.6.5):
var msie, // holds major version number for IE, or NaN if UA is not IE.
// Support: IE 9-11 only
/**
* documentMode is an IE-only property
* http://msdn.microsoft.com/en-us/library/ie/cc196988(v=vs.85).aspx
*/
msie = window.document.documentMode;
Then there are several lines of code scattered throughout using it as a number such as
if (event === 'input' && msie <= 11) return false;
and
if (enabled && msie < 8) {