Object.isSealed()
Baseline
Widely available
This feature is well established and works across many devices and browser versions. It’s been available across browsers since July 2015.
The Object.isSealed() static method determines if an object is sealed.
Try it
Syntax
Parameters
obj-
The object which should be checked.
Return value
A Boolean indicating whether or not the given object is sealed.
Description
Returns true if the object is sealed, otherwise false. An
object is sealed if it is not extensible and
if all its properties are non-configurable and therefore not removable (but not
necessarily non-writable).
Examples
Using Object.isSealed
Non-object argument
In ES5, if the argument to this method is not an object (a primitive), then it will cause a TypeError. In ES2015, it will return true without any errors if a non-object argument is passed, since primitives are, by definition, immutable.
Specifications
| Specification |
|---|
| ECMAScript® 2026 Language Specification # sec-object.issealed |