mirror of
https://github.com/marko-js/marko.git
synced 2025-12-08 19:26:05 +00:00
29 lines
668 B
Plaintext
29 lines
668 B
Plaintext
class {
|
|
onMount() {
|
|
this.events = [];
|
|
}
|
|
|
|
handleAttach(color, event, node) {
|
|
this.events.push({
|
|
color: color,
|
|
event: event,
|
|
node: node
|
|
});
|
|
}
|
|
}
|
|
|
|
<ul>
|
|
<color-include>
|
|
<if(input.color === "blue")>
|
|
<li.color on-attach("handleAttach", input.color)>blue</li>
|
|
</if>
|
|
<else-if(input.color === "green")>
|
|
<li.color on-attach("handleAttach", input.color)>green</li>
|
|
</else-if>
|
|
<else>
|
|
<li.color on-attach("handleAttach", input.color)>
|
|
${input.color}
|
|
</li>
|
|
</else>
|
|
</color-include>
|
|
</ul> |