2016-10-10 03:43:44 +02:00
|
|
|
// 26.1.12 Reflect.preventExtensions(target)
|
2017-08-14 05:01:11 +02:00
|
|
|
var $export = require('./_export');
|
|
|
|
var anObject = require('./_an-object');
|
|
|
|
var $preventExtensions = Object.preventExtensions;
|
2016-10-10 03:43:44 +02:00
|
|
|
|
|
|
|
$export($export.S, 'Reflect', {
|
2017-08-14 05:01:11 +02:00
|
|
|
preventExtensions: function preventExtensions(target) {
|
2016-10-10 03:43:44 +02:00
|
|
|
anObject(target);
|
|
|
|
try {
|
2017-08-14 05:01:11 +02:00
|
|
|
if ($preventExtensions) $preventExtensions(target);
|
2016-10-10 03:43:44 +02:00
|
|
|
return true;
|
2017-08-14 05:01:11 +02:00
|
|
|
} catch (e) {
|
2016-10-10 03:43:44 +02:00
|
|
|
return false;
|
|
|
|
}
|
|
|
|
}
|
2017-08-14 05:01:11 +02:00
|
|
|
});
|