diff --git a/core/utils.js b/core/utils.js index 25d4a58ab..3b7d84142 100644 --- a/core/utils.js +++ b/core/utils.js @@ -434,7 +434,7 @@ Blockly.utils.is3dSupported = function() { } // CC-BY-SA Lorenzo Polidori // stackoverflow.com/questions/5661671/detecting-transform-translate3d-support - if (!Blockly.utils.global.getComputedStyle) { + if (!Blockly.utils.global['getComputedStyle']) { return false; } @@ -454,7 +454,7 @@ Blockly.utils.is3dSupported = function() { for (var t in transforms) { if (el.style[t] !== undefined) { el.style[t] = 'translate3d(1px,1px,1px)'; - var computedStyle = Blockly.utils.global.getComputedStyle(el); + var computedStyle = Blockly.utils.global['getComputedStyle'](el); if (!computedStyle) { // getComputedStyle in Firefox returns null when Blockly is loaded // inside an iframe with display: none. Returning false and not diff --git a/core/utils/useragent.js b/core/utils/useragent.js index 84d036d57..453fa01d2 100644 --- a/core/utils/useragent.js +++ b/core/utils/useragent.js @@ -107,4 +107,4 @@ Blockly.utils.userAgent.MOBILE; Blockly.utils.userAgent.MOBILE = !Blockly.utils.userAgent.TABLET && (Blockly.utils.userAgent.IPOD || Blockly.utils.userAgent.IPHONE || Blockly.utils.userAgent.ANDROID || has('IEMobile')); -})((Blockly.utils.global.navigator && Blockly.utils.global.navigator.userAgent) || ''); +})((Blockly.utils.global['navigator'] && Blockly.utils.global['navigator']['userAgent']) || '');