ES3.1 Object static methods rationale document

Garrett Smith dhtmlkitchen at gmail.com
Wed Jul 16 21:16:32 PDT 2008


2008/7/15 Allen Wirfs-Brock <Allen.Wirfs-Brock at microsoft.com>:
> I've up loaded to the wiki a new document titled:  "Proposed ECMAScript
3.1
> Static Object Functions: Use Cases and Rationale"
>
>
A couple of questions for you:

My first question: How does an ES3.1 "sealed" object relate to fixtures?

______________| ES 3.1 ______| ES4___________
Sealed object | Object.seal  | fixture (var)

My second question is about Object.create. Object.create() mixes adding a
prototype to an object with a
specialized context where the (verbose) object literal contains certain
property names, such as "value", take on contextual meaning to the
property.

1. What happens when an unrecognized property is in the descriptor? (1)
2. Is it only possible to define attributes on the top level? (2)

(1)
Object.create(myProto, {
 method3: {
   enumerable: false, writable: false,
   novalue : true // no [[value]] + custom attribute
 },
 ,method2: undefined
});

(2) Object.create(myProto, {
 o1: {
   enumerable: true, writable: false,
   value : {
     enumerable : false,
     value : undefined
   }
 }
});

Garrett
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.mozilla.org/pipermail/es-discuss/attachments/20080716/51956f46/attachment-0002.html 


More information about the Es4-discuss mailing list