#1112 new

Extending the object model to support ecmascript v262 (es5) features

Reported by bjc | August 7th, 2010 @ 09:41 PM

Feature Request:

It would be nice to have the object model api to support es5 object and property features such as object freezing and read-only properties.

//-- start of bad use cases --

// example problem - read only properties (not sure of good api to help with this) MyEvent = Class.create({

initialize: function(data) {
    var d = data || {};

    // this needs to be improved (api wise)
    Object.defineProperty(this, "data", {
        value: d,
        writeable: false,
        configurable: false,
        enumerable: false,


// example problem "final" classes. (demonstrated using proposed api) var KeyboardEvent = Class.extend(MyEvent, {

initialize: function(keycode, data) {
    this.keycode = keycode;

freeze: true // or sealed etc.


//-- end of bad use cases

Please excuse the vagueness of this report. If there is any confusion don't hesitate to email me and i'll try and describe the request further.

No comments found

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป

The Prototype JavaScript library.

Shared Ticket Bins

People watching this ticket