Skip to content

Commit ed3b2c0

Browse files
authored
Merge pull request #2696 from odsantos/property-descriptors
Update URLs
2 parents d3ae613 + a19e517 commit ed3b2c0

File tree

1 file changed

+10
-10
lines changed
  • 1-js/07-object-properties/01-property-descriptors

1 file changed

+10
-10
lines changed

1-js/07-object-properties/01-property-descriptors/article.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ We didn't see them yet, because generally they do not show up. When we create a
1919

2020
First, let's see how to get those flags.
2121

22-
The method [Object.getOwnPropertyDescriptor](mdn:js/Object/getOwnPropertyDescriptor) allows to query the *full* information about a property.
22+
The method [Object.getOwnPropertyDescriptor](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/getOwnPropertyDescriptor) allows to query the *full* information about a property.
2323

2424
The syntax is:
2525
```js
@@ -54,7 +54,7 @@ alert( JSON.stringify(descriptor, null, 2 ) );
5454
*/
5555
```
5656

57-
To change the flags, we can use [Object.defineProperty](mdn:js/Object/defineProperty).
57+
To change the flags, we can use [Object.defineProperty](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/defineProperty).
5858

5959
The syntax is:
6060

@@ -274,7 +274,7 @@ We can change `writable: true` to `false` for a non-configurable property, thus
274274

275275
## Object.defineProperties
276276

277-
There's a method [Object.defineProperties(obj, descriptors)](mdn:js/Object/defineProperties) that allows to define many properties at once.
277+
There's a method [Object.defineProperties(obj, descriptors)](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/defineProperties) that allows to define many properties at once.
278278

279279
The syntax is:
280280

@@ -300,7 +300,7 @@ So, we can set many properties at once.
300300

301301
## Object.getOwnPropertyDescriptors
302302

303-
To get all property descriptors at once, we can use the method [Object.getOwnPropertyDescriptors(obj)](mdn:js/Object/getOwnPropertyDescriptors).
303+
To get all property descriptors at once, we can use the method [Object.getOwnPropertyDescriptors(obj)](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/getOwnPropertyDescriptors).
304304

305305
Together with `Object.defineProperties` it can be used as a "flags-aware" way of cloning an object:
306306

@@ -326,24 +326,24 @@ Property descriptors work at the level of individual properties.
326326

327327
There are also methods that limit access to the *whole* object:
328328

329-
[Object.preventExtensions(obj)](mdn:js/Object/preventExtensions)
329+
[Object.preventExtensions(obj)](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/preventExtensions)
330330
: Forbids the addition of new properties to the object.
331331

332-
[Object.seal(obj)](mdn:js/Object/seal)
332+
[Object.seal(obj)](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/seal)
333333
: Forbids adding/removing of properties. Sets `configurable: false` for all existing properties.
334334

335-
[Object.freeze(obj)](mdn:js/Object/freeze)
335+
[Object.freeze(obj)](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/freeze)
336336
: Forbids adding/removing/changing of properties. Sets `configurable: false, writable: false` for all existing properties.
337337

338338
And also there are tests for them:
339339

340-
[Object.isExtensible(obj)](mdn:js/Object/isExtensible)
340+
[Object.isExtensible(obj)](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/isExtensible)
341341
: Returns `false` if adding properties is forbidden, otherwise `true`.
342342

343-
[Object.isSealed(obj)](mdn:js/Object/isSealed)
343+
[Object.isSealed(obj)](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/isSealed)
344344
: Returns `true` if adding/removing properties is forbidden, and all existing properties have `configurable: false`.
345345

346-
[Object.isFrozen(obj)](mdn:js/Object/isFrozen)
346+
[Object.isFrozen(obj)](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/isFrozen)
347347
: Returns `true` if adding/removing/changing properties is forbidden, and all current properties are `configurable: false, writable: false`.
348348

349349
These methods are rarely used in practice.

0 commit comments

Comments
 (0)