mirror of
https://github.com/Fechin/reference.git
synced 2026-11-22 22:02:41 +03:00
21 lines
366 B
Markdown
21 lines
366 B
Markdown
---
|
|
title: How to detect internet explorer browser in JavaScript
|
|
tags:
|
|
- JavaScript
|
|
- one-line
|
|
- js
|
|
- DOM
|
|
layout: note
|
|
---
|
|
|
|
|
|
|
|
In this Article we will go through how to detect internet explorer browser only using single line of code in JavaScript.
|
|
<br/>
|
|
<br/>
|
|
Let's define this short function:
|
|
|
|
```js {.wrap}
|
|
const isIE = !!document.documentMode;
|
|
```
|