Hi there! Thank you :)
It is based on the Navier Stokes equations. Not perfectly accurate but fast enough for cool real time simulations.
The solver which this is based on is described here: http://graphics.cs.cmu.edu/nsp/course/15-464/Fall09/papers/StamFluidforGames.pdf
Glad to know WebGL is more widely supported now!