Didn't read the code of this specific project but if recall correctly, you can change the favicon by setting it in the dom to the base64 representation of the icon data any time. From there, generating animations is just a question of filling pixels data with the canvas API and getting the resulting base64 string out of said API as well. Obviously all of this works only if the browser is relatively modern.
I for one would be very curious to read about how this works (too lazy to read code right now!)...