From fbbdaf7dfafc44d8bcd5f1e126c2febf54f04e28 Mon Sep 17 00:00:00 2001 From: Bruno Windels Date: Mon, 2 Nov 2020 11:16:19 +0100 Subject: [PATCH] expose IE11 flag in JS as well --- src/platform/web/Platform.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/platform/web/Platform.js b/src/platform/web/Platform.js index fa3451db..87b055cd 100644 --- a/src/platform/web/Platform.js +++ b/src/platform/web/Platform.js @@ -99,6 +99,8 @@ export class Platform { } else { this.request = xhrRequest; } + const isIE11 = !!window.MSInputMethodContext && !!document.documentMode; + this.isIE11 = isIE11; } get updateService() { @@ -116,8 +118,7 @@ export class Platform { } createAndMountRootView(vm) { - const isIE11 = !!window.MSInputMethodContext && !!document.documentMode; - if (isIE11) { + if (this.isIE11) { this._container.className += " legacy"; } window.__hydrogenViewModel = vm;