Use passed element instead document to listen events