From fc6b0e9bf29f762db6b444930168b27ecb888d2a Mon Sep 17 00:00:00 2001 From: Yury Delendik Date: Thu, 20 Sep 2012 10:24:51 -0500 Subject: [PATCH] Workaround for android gb browser bug --- web/compatibility.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/web/compatibility.js b/web/compatibility.js index 603caaca8..bf06168da 100644 --- a/web/compatibility.js +++ b/web/compatibility.js @@ -94,11 +94,16 @@ // Object.defineProperty() ? (function checkObjectDefinePropertyCompatibility() { if (typeof Object.defineProperty !== 'undefined') { - // some browsers (e.g. safari) cannot use defineProperty() on DOM objects - // and thus the native version is not sufficient var definePropertyPossible = true; try { + // some browsers (e.g. safari) cannot use defineProperty() on DOM objects + // and thus the native version is not sufficient Object.defineProperty(new Image(), 'id', { value: 'test' }); + // ... another test for android gb browser for non-DOM objects + function Test() {} + Test.prototype = { get id() { } }; + Object.defineProperty(new Test(), 'id', + { value: '', configurable: true, enumerable: true, writable: false }); } catch (e) { definePropertyPossible = false; }