JavaScript Reflect.isExtensible() Method

Beginner
5 min read
Updated: Nov 2026
3 examples
Static method

Definition

Reflect.isExtensible(target) checks whether you can add new properties to an object. It returns true for a normal object, and false if the object has been locked with Object.preventExtensions(), Object.seal() or Object.freeze().

It only talks about adding properties. A non-extensible object may still allow you to change or delete the properties it already has.

Remember
Reflect.isExtensible(target)

normal object          → true
preventExtensions()    → false
seal()                 → false
freeze()               → false

Once false, it never becomes true again
target must be an object, or TypeError

Syntax

Pass an object and read the boolean.

JavaScript
const settings = { theme: "dark" };

console.log(Reflect.isExtensible(settings));   // true

Object.freeze(settings);
console.log(Reflect.isExtensible(settings));   // false
CallWhat it does
Reflect.isExtensible(obj)true if new properties can be added to obj.
Reflect.preventExtensions(obj)Make an object non-extensible, so this method returns false.
Object.isFrozen(obj)A stricter check: also true when nothing can be changed or removed.
Object.isExtensible(obj)The older version. For primitives it returns false instead of throwing.

A standard JavaScript static method (ES2015) of the Reflect object: call it as Reflect.isExtensible(). No import required. Siblings: Reflect.apply(), Reflect.construct(), Reflect.defineProperty(), Reflect.deleteProperty(), Reflect.get(), Reflect.getOwnPropertyDescriptor(), Reflect.getPrototypeOf(), Reflect.has(), Reflect.ownKeys(), Reflect.preventExtensions(), Reflect.set(), Reflect.setPrototypeOf().

Library declarations
JavaScript
// ECMAScript 2015 (ES6)
Reflect.isExtensible(target)

// target : an object
// returns: true or false
// throws : TypeError if target is not an object

Parameters

ParameterDescription
targetRequired. The object to check. If it is not an object, a TypeError is thrown.

Return Value

Return ValueDescription
trueNew properties can be added to the object.
falseThe object is not extensible: new properties cannot be added.
TypeError (thrown)target is not an object.

JavaScript Examples

Example 1 — Check Whether an Object Is Extensible

A normal object can grow. After Object.preventExtensions(), it cannot.

JavaScript
const box = { width: 10 };
console.log("New object: " + Reflect.isExtensible(box));

Object.preventExtensions(box);
console.log("After preventExtensions: " + Reflect.isExtensible(box));

box.height = 5;
console.log("Has height: " + ("height" in box));
console.log("Width: " + box.width);
Try It Yourself

How It Works

  1. Starts extensible. Every normal object lets you add properties, so the first answer is true.
  2. Locked. Object.preventExtensions(box) stops new properties. The answer is now false.
  3. Adding is ignored. box.height = 5 does nothing (it would throw in strict mode), but the existing width is untouched.

Example 2 — Compare preventExtensions, seal and freeze

All three make the answer false. The other Object checks show the difference.

JavaScript
const open = {};
const noAdd = Object.preventExtensions({});
const sealed = Object.seal({});
const frozen = Object.freeze({});

console.log("open: " + Reflect.isExtensible(open));
console.log("preventExtensions: " + Reflect.isExtensible(noAdd) + ", sealed " + Object.isSealed(noAdd) + ", frozen " + Object.isFrozen(noAdd));
console.log("seal: " + Reflect.isExtensible(sealed) + ", sealed " + Object.isSealed(sealed) + ", frozen " + Object.isFrozen(sealed));
console.log("freeze: " + Reflect.isExtensible(frozen) + ", sealed " + Object.isSealed(frozen) + ", frozen " + Object.isFrozen(frozen));
Try It Yourself

How It Works

  1. Three ways to lock. Each of the three objects is non-extensible, so Reflect.isExtensible() gives false every time.
  2. Empty objects are special. These objects have no properties, so there is nothing to change or delete. That is why isSealed() and isFrozen() also say true for all three.
  3. Use a bigger object to see more. With real properties, preventExtensions() would give isSealed() as false. The next page, Reflect.preventExtensions(), shows this.

Example 3 — Primitives and Errors

Compare the older Object.isExtensible() with Reflect for values that are not objects. The catch block prints the error type only.

JavaScript
console.log("Object with 5: " + Object.isExtensible(5));

try {
  Reflect.isExtensible(5);
} catch (err) {
  console.log("Reflect with 5: " + err.name);
}

try {
  Reflect.isExtensible(null);
} catch (err) {
  console.log("Reflect with null: " + err.name);
}

console.log("Array: " + Reflect.isExtensible([]));
console.log("Function: " + Reflect.isExtensible(function () {}));
Try It Yourself

How It Works

  1. The older method is forgiving. Object.isExtensible(5) treats a primitive as "not extensible" and answers false.
  2. Reflect is strict. A number and null are not objects, so Reflect.isExtensible() throws a TypeError for both. This catches mistakes early.
  3. Arrays and functions are objects. They are extensible by default, so both answers are true.

Browser & Runtime Support

Reflect.isExtensible() is part of ES2015 (ES6), together with the Reflect object. Every current browser and Node.js has it.

✓ ES2015 · Widely supported

Reflect.isExtensible()

Supported in Chrome 49+, Edge 12+, Firefox 42+, Safari 10+, Opera 36+ and Node.js 6+. Internet Explorer never got it.

ES2015 Standard since
Google Chrome 49+ · Desktop & Mobile
Full support
Microsoft Edge 12+ · Chromium and legacy
Full support
Mozilla Firefox 42+ · Desktop & Mobile
Full support
Apple Safari 10+ · macOS & iOS
Full support
Opera 36+ · Chromium based
Full support
Samsung Internet Recent versions · Android
Supported
Android WebView 49+ · Chromium based
Supported
Node.js 6+ · Server runtime
Supported
Deno Supported · JavaScript runtime
Supported
Bun Supported · JavaScript runtime
Supported
Internet Explorer No native support
Not supported
Reflect.isExtensible() Excellent

Bottom line: Safe to use in every current browser and in Node.js. The only thing to plan for is Internet Explorer, which has no Reflect at all.

Frequently Asked Questions

It checks whether you can add new properties to an object. It returns true for a normal object and false for an object that was locked with preventExtensions(), seal() or freeze().
No. It only means that new properties cannot be added. A non-extensible object can still allow changes and deletions. Use Object.isSealed() and Object.isFrozen() for the stricter levels.
No. Locking is permanent. There is no method that makes an object extensible again, so make a copy if you need a version that can grow.
For objects they are the same. For primitives, Object.isExtensible(5) returns false, while Reflect.isExtensible(5) throws a TypeError.
It helps libraries and Proxy handlers behave correctly. For example, code that adds a hidden property to an object can first check that the object is still extensible.

Next: Reflect.ownKeys()

Learn how to list every own property key of an object, including symbols and hidden properties.

Reflect.ownKeys() tutorial →

About the author

Mari Selvan M P
Mari Selvan M P 🔗

Developer, cloud engineer, and technical writer

  • Experience 12 years building web and cloud systems
  • Focus Full Stack Development, AWS, and Developer Education

I write practical tutorials so students and working developers can learn by doing—from databases and APIs to deployment on AWS.

8 people found this page helpful