The syntax for this is
label.on('selected', functionToCall())
No. The syntax for event handlers is to pass the handler function, not to call it:
label.on('selected', functionToCall);
You might want to try label.on('selected', onLabelSelection.bind(this))
or - since this
inside createLablel
is apparently undefined
- just label.on('selected', onLabelSelection)
.