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