You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Apr 12, 2024. It is now read-only.
I was testing a little around, and hard to come up with some tests for this, but in some cases document.documentMode are returned undefined when identifying IE.
Mostly I encountered this on ES6 transpillers where they don't have a window object directly. Example es6transpiller() where you have to add globals like / globals window, document / if you need access to window.
There are also several other scenarios this happen. Simply because the console (F12) are not open.
As a workaround I found this solution:
var jscriptVersion = window.ScriptEngineMajorVersion,
ie = jscriptVersion && jscriptVersion();
With this code it works in all scenarios.
The text was updated successfully, but these errors were encountered:
Hi
I was testing a little around, and hard to come up with some tests for this, but in some cases document.documentMode are returned undefined when identifying IE.
Mostly I encountered this on ES6 transpillers where they don't have a window object directly. Example es6transpiller() where you have to add globals like / globals window, document / if you need access to window.
There are also several other scenarios this happen. Simply because the console (F12) are not open.
As a workaround I found this solution:
var jscriptVersion = window.ScriptEngineMajorVersion,
ie = jscriptVersion && jscriptVersion();
With this code it works in all scenarios.
The text was updated successfully, but these errors were encountered: