js: exceptions added to markAsSelected()