ECMA-262-5 in detail. Chapter 1. Properties and Property Descriptors.

Read this article in: Russian.

Introduction

This chapter is devoted generally to one of new concepts of the ECMA-262-5 specification — to property attributes and mechanism of their handling — property descriptors.

Usually saying that “an object has some property” we mean an association between a property name and its value. But as we know from the ES3 analysis, a property structure is more complex than just a string name. It also has set of attributes — those which we already discussed in ES3, e.g. {ReadOnly}, {DontEnum} and other. So from this viewpoint a property is as an object itself. Continue reading

Тонкости ECMA-262-5. Часть 1. Свойства и дескрипторы свойств

Read this article in: English.

Введение

Эта глава посвященна одной из новых концепций в спецификации ECMA-262-5 — атрибутам свойств и механизму работы с ними, дескрипторам свойств.

Обычно, говоря, что объект имеет какие-то свойства, мы имеем ввиду связь между именем свойства и его значением. Но, как мы знаем из анализа ES3, структура свойства несколько сложнее, чем просто строковое имя. Оно также имеет набор атрибутов — те, которые мы уже обсудили в статьях об ES3, например {ReadOnly}, {DontEnum} и другие. С этой точки зрения свойство само по себе является объектом. Continue reading