Implement getSelection