-
Notifications
You must be signed in to change notification settings - Fork 17
Description
The native implementation of Object.defineProperties
on Android version >= 2.3.6 && <= 4.0.3 seems to be buggy, where the following test case fails as below, can we check if we need to shim up a bit on those devices?
==========Code==========
function fn() {};
try {
Object.defineProperties(fn, {
prototype: {
value: {
test: true
}
}
});
}
catch (ex) {
alert(ex);
}
alert(fn.prototype.test);
==========Code==========
==========Result=========
Platform APILevel Result
1.5 3 TypeError: Result of expression 'Object.defineProperties' [undefined] is not a function
1.6 4 TypeError: Result of expression 'Object.defineProperties' [undefined] is not a function
2.1 7 TypeError: Result of expression 'Object.defineProperties' [undefined] is not a function
2.2 8 true
2.3.3 10 true
2.3.6 x undefined
4.0 14 undefined
4.0.3 15 undefined
4.1.2 16 true
4.2.2 17 true
4.3 18 true
4.4.2 19 true
==========Result=========