add onNodeSelected event