Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

document.documentMode return undefined #11541

Open
@ghost

Description

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions