Abstracting DOM selection layer