You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
displayBelowParticle
templateLiteral
<ul>
<li>${this.get("field1")}</li>
<li>${this.get("field2")}</li>
</ul>
templateLiteral scroll
ul
li ${this.get("field1")}
li ${this.get("field2")}
someParticle
field1 value1
field2 value2
The subparticles of templateLiteral (without an atom following the cue) will be expanded as a normal javascript template literal. If the first atom is scroll, then it will be called using the tagged functon scroll (i.e. scroll`<subparticles here>` ). The scroll tagged function will convert to html, I guess.
In either case, some variable (like this) above will be set to allow access to the selected particle.
The text was updated successfully, but these errors were encountered:
After looking how template literals work in javascript, this idea doesn't seem so appealing anymore. I thought under-the-hood there was some javascript function which can perform whatever substitution the javascript parser performs. But that is not the case and therefore using template literals is likely no better than using eval on a javascript string.
This is somewhat related to the
particleExplorer
discussion in #154, except instead here javascript template literals are usedThe subparticles of
templateLiteral
(without an atom following the cue) will be expanded as a normal javascript template literal. If the first atom isscroll
, then it will be called using the tagged functon scroll (i.e.scroll`<subparticles here>`
). The scroll tagged function will convert to html, I guess.In either case, some variable (like
this
) above will be set to allow access to the selected particle.The text was updated successfully, but these errors were encountered: