[ Web Proxy ]
URL:
Viewing: https://developer.mozilla.org/ko/docs/Web/JavaScript/Reference/Global_Objects/Reflect/isExtensible [Back]  [Original]

Reflect.isExtensible() - JavaScript | MDN

This page was translated from English by the community. Learn more and join the MDN Web Docs community.

View in English Always switch to English

Reflect.isExtensible()

Baseline Widely available

This feature is well established and works across many devices and browser versions. Its been available across browsers since 2016 9.

Reflect.isExtensible() , . Object.isExtensible() .

In this article

const object1 = {};

console.log(Reflect.isExtensible(object1));
// Expected output: true

Reflect.preventExtensions(object1);

console.log(Reflect.isExtensible(object1));
// Expected output: false

const object2 = Object.seal({});

console.log(Reflect.isExtensible(object2));
// Expected output: false

js
Reflect.isExtensible(target);

target

.

Boolean.

target Object TypeError.

Reflect.isExtensible() Object.isExtensible() , .

Reflect.isExtensible()

Object.isExtensible() .

js
//    
var empty = {};
Reflect.isExtensible(empty); // === true

// ...   
Reflect.preventExtensions(empty);
Reflect.isExtensible(empty); // === false

//    
var sealed = Object.seal({});
Reflect.isExtensible(sealed); // === false

//    
var frozen = Object.freeze({});
Reflect.isExtensible(frozen); // === false

Object.isExtensible()

Reflect.isExtensible() TypeError . Object.isExtensible() .

js
Reflect.isExtensible(1);
// TypeError: 1 is not an object

Object.isExtensible(1);
// false

Specification
ECMAScript 2027 LanguageSpecification
# sec-reflect.isextensible


Web Proxy Viewer  |  New URL  |  Original Page