The link [https://ccamel.github.io/playground-binding.scala/index.html#playground-binding.scala/home] has few demos of binding.scala I have used DomListner extension in chrome to understand the dom events. I found for each interaction there are hundreds of DOM events fired. For example one click on calculator button results in 114 events.
It's the expected behavior, because the DEMO that you mentioned recreated anchor elements, explicitly.
According to the Scaladoc for bind
method:
Each time the value changes, in the current
@dom
method, all code after the currentbind
expression will be re-evaluated
As a result, the calc.bind
call at here forces recreating the anchor element.
I created a pull request to change the class
attribute instead, by avoiding the calc.bind
call before XHTML literals.