A method is provided for increasing the aqueous outflow of fluid through a trabecular meshwork and into a Schlemms canal of an eye. A liquid hydrogel precursor solution is introduced into the Schlemms canal, during a medical procedure. The liquid hydrogel precursor solution is crosslinked to form a water-permeable flexible semi-solid hydrogel in the Schlemms canal, during the medical procedure. The hydrogel is left in the Schlemms canal upon conclusion of the medical procedure. Other embodiments are also described.