15.2.3.11 Object.isSealed(O)

2010-07-04

boolean Object.isSealed(O:object) throws TypeError

An object is sealed if and only if all of its properties have [[Configurable]] set to false and O has [[Extensible]] set to false.

Code: (Meta Ecma)
Object.isSealed = function(O){
if (Type(O) != 'Objecct') throw TypeError;
for (P in O) {
var desc = O.[[GetOwnProperty]](P);
if (desc.[[Configurable]]) return false;
}
return !O.[[Extensible]];
}