Using monocle mustache for chaining.

Bradley Meck bradley.meck at gmail.com
Fri Nov 11 11:38:37 PST 2011


It appears to be assigning multiple properties in place and at once and
returning the original object if I am understanding correctly.

On Fri, Nov 11, 2011 at 1:27 PM, 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?
>
> Luke
> _______________________________________________
> es-discuss mailing list
> es-discuss at mozilla.org
> https://mail.mozilla.org/listinfo/es-discuss
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20111111/36d6e667/attachment.html>


More information about the es-discuss mailing list