chopper draw lion4
chopper draw lion4

Reputation: 13487

Javascript: What is the relationship between property descriptors and built-in property attributes

According to this article the following builtin property attributes determine an objects writability characteristics: ReadOnly, DontEnum, DontDelete and Internal..

I also read about property descriptors determining an objects writability characteristics. A few notable ones are: enumerable, writable, configurable.

What is the relationship between these two concepts? They seem very similar, but I can't find any content which regards them as such.

Upvotes: 3

Views: 101

Answers (1)

Alex
Alex

Reputation: 11245

This is 8.6.1 Property Attributes section from different docs. ECMAScript 5.1 is actual specification of Javascript.

ECMAScript 3 Object Model (inner, for browser engine usage)

  • ReadOnly
  • DontEnum
  • DontDelete
  • Internal

ECMAScript 5.1 Object Model (enable set/get in javascript):

  • [[Enumerable]]
  • [[Configurable]]
  • [[Writable]]
  • [[Value]]

Upvotes: 1

Related Questions