15.2.3.10 Object.preventExtensions(O)

2010-07-04

object Object.preventExtensions(O:object)

Sets the [[Extensible]] attribute for object O to false. This means you cannot create new own properties for O.

Code: (Meta Ecma)
Object.preventExtensions = function(O){
if (Type(O) != 'Object') throw TypeError;
O.[[Extensible]] = false;
return O;
}