Skip to content

'each' iterations close over vars

Compare
Choose a tag to compare
@tdumitrescu tdumitrescu released this 09 Dec 23:38
· 105 commits to master since this release

This was unspecified behavior changed in v0.6.0, now restored. Permits code such as the following to work "as expected" (i.e. clicking on the third item in items will call the handler with the third item as its argument):

each item in items
  button(onclick=() => clickedItem(item))= item