Adds onselectionchange event.