On Wed, May 30, 2012 at 4:34 PM, Anton Kovalyov <m...@kovalyov.net> wrote:
> I have a question. Here (https://gist.github.com/9a6d60e9c15ac4239b3d) I
> took a piece of existing boilerplate code and rewrote it using the new
> syntax. However on L18 I have data-disqus-id that cannot be used on a left
> hand side of assignment. What's a preferred way to deal with this? Move it
> to the outside?

Two possibiliities.

If you use the dataset API, like you should, there's no problem:

widget.{
  ...
  dataset.disqusId = "dsq1";
};

Alternately, you can keep using setAttribute, since Dave's syntax
allows method calls as well:

widget.{
  ...
  setAttribute('data-disqus-id', "dsq1");
}

~TJ
_______________________________________________
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to