megclaypool
1/8/2020 - 10:06 PM

Detect if the browser is IE in Javascript

[Detect if the browser is IE in Javascript]

// Detect Internet Explorer with Ducktyping
// https://stackoverflow.com/a/31479176/6412747

var isIE = /*@cc_on!@*/false || !!document.documentMode;

// Then you could use that as a conditional
if(!isIE) {
  ...
}