main
Last change
on this file since 79a0317 was 79a0317, checked in by stefan toskovski <stefantoska84@…>, 3 days ago |
F4 Finalna Verzija
|
-
Property mode
set to
100644
|
File size:
673 bytes
|
Line | |
---|
1 | 'use strict';
|
---|
2 | var $ = require('../internals/export');
|
---|
3 | var getBuiltIn = require('../internals/get-built-in');
|
---|
4 | var anObject = require('../internals/an-object');
|
---|
5 | var FREEZING = require('../internals/freezing');
|
---|
6 |
|
---|
7 | // `Reflect.preventExtensions` method
|
---|
8 | // https://tc39.es/ecma262/#sec-reflect.preventextensions
|
---|
9 | $({ target: 'Reflect', stat: true, sham: !FREEZING }, {
|
---|
10 | preventExtensions: function preventExtensions(target) {
|
---|
11 | anObject(target);
|
---|
12 | try {
|
---|
13 | var objectPreventExtensions = getBuiltIn('Object', 'preventExtensions');
|
---|
14 | if (objectPreventExtensions) objectPreventExtensions(target);
|
---|
15 | return true;
|
---|
16 | } catch (error) {
|
---|
17 | return false;
|
---|
18 | }
|
---|
19 | }
|
---|
20 | });
|
---|
Note:
See
TracBrowser
for help on using the repository browser.