On 21/03/2008, Lars Hansen <[EMAIL PROTECTED]> wrote:
> I've attempted to sum up everything we have decided about object
> initializers (aka object literals). A short draft spec is included.
> Comments welcome from everyone, especially from ES4 WG members who might
> remember about things I've forgotten, or correct misunderstandings.
Just a few ideas, I think there's a few declarative features I'd like
to see added:
- I'd *really* like to see some declarative syntax for setting
{DontEnum} flag on properties in object initialisers.
- A declarative way to set catch-alls.
- A declarative way to set the [[Call]] property.
- And maybe declarative way to set the [[Prototype]] property. (This
would of course be const.)
var
a={
dontenum toString: function()'[object customObj]'
},
b={
[[Prototype]]: a,
[[Call]]: function()...,
get *: function(propname)...,
set *: function(propname, value)...,
...
};
The brackets for syntax would from what I can tell work here, since
they are syntax errors in ES3. Or using some double keyword syntax I
guess.
--
David "liorean" Andersson
_______________________________________________
Es4-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es4-discuss