Using monocle mustache for chaining.

Oliver Hunt oliver at apple.com
Fri Nov 11 11:38:37 PST 2011


I'm sorry, i don't understand the semantics you're going for here.  What is 
document.querySelector('#myTable').{
  querySelectorAll('.firstColumn').{
    style.{background: 'red', border: '2px solid black'},
    textContent: 'first column'
  },
  querySelectorAll('.lastColumn').{
    style.{background: 'blue', border: '2px solid black'},
    textContent: 'last column'
  }
};

meant to do?

the outermost .{ is of the form
.{expression, expression}

Which isn't valid.

But ignoring that, the decision we made at last november's meeting was that DOM attributes would be specified as setters on the prototype, so

someElement.style.{background:"blue", border: "2px solid black"}

would add to own properties to the style instance, but not actually change the style properties in the CSSOM, as .{ shares the normal object literal semantic of only performing own property assignment.

--Oliver


More information about the es-discuss mailing list