A $3.77 waterproof case for Arduino Projects

I wonder if you mounted an IR range detector directly onto the inside of the lens it would still work and keep the project waterproof.