The goal is to prevent the crack from growing.
If it is a plexi-glass (plastic) window, the solution is very simple. Just drill a small hole maybe 1/8" diameter into the end of the crack to stop the crack from growing. Then fill the hole with a clear caulk. The crack itself will let in so little water than you'd have a hard time seeing it. It would evaporate before it hits the floor.
The same applies to tempered glass but that would best be handled by a professional windshield repairman. He too will drill a hole using a special bit with a Dremel tool. He will use a special made-for-glass sealer. His hole will be so tiny that you'd need a magnifier to see it.
I stopped a windshield crack from growing on a 1971 Oldsmobile windshield back in 1979, but it was primitive and ugly. I used a brass rivet as a hollow drill bit, and used grinding compound as the abrasive. I don't recommend it for it was a very long and tedious process that looked like I did it.