Using monocle mustache for chaining.
Erik Arvidsson
erik.arvidsson at gmail.com
Fri Nov 11 11:36:00 PST 2011
On Fri, Nov 11, 2011 at 11:27, Luke Hoban <lukeh at microsoft.com> wrote:
>
> > document.querySelector('#my-element').{
> > style.{
> > 'color': 'red',
> > 'padding': '5px'
> > }.
> > textContent: 'Hello'
> > };
>
> I don't think I've seen this form of the .{ syntax discussed before. Is an expression being used as the LHS of an object literal property assignment? What does "foo.{ bar.baz: 12}" mean exactly?
I haven't seen that form either ;-) Allen suggested allowing .{ on the
LHS which would mean get the value of the property and then apply the
properties of the RHS to that.
--
erik
More information about the es-discuss
mailing list