the most important thing you can do is shut it off!
If possible pull the plug and if it has a battery that's removable disconnect it asap.
Ever spilled on a phone laptop tv game system, pc or other electronic device? Most of the time it's not ruined but you have to act quickly. Bellow I'll show you the repair operation on my last DSL modem.
But first here's what you need to do to save your device:
1) TURN IT OFF!
Damage to electronics usually isn't done by the water or liquid itself, it's primarly the short circuits it creates.
LCDs are one exception, water will get between the layers and you can usually save the screen but you will never restore the image quality with our replacing it.
That said...general rule of thumb is off asap.
operating submerged in water stuff will experience accelerated corrosion. It's not great for it to run underwater but what we really want to prevent is damage from short circuits.
2) PULL THE PLUG AND OR REMOVE BATTERIES!
If it plugs into the wall or a charge cable; disconnect/unplug right away. If there is a removable battery; remove it.
Long after you've fetched the phone from the toilet, the inside of the phone remains wet.
Even after it dries all the dirt and crap that crept in from you pocket/environment has been mixed with the liquid and deposited as a sludge across all the pins and traces of the circuit board inside.
So for the same reason you want to cease the power flow while it's wet you want to keep it off until someone can clean the inside. This deposited sludge can easily need to short circuits that will cause permanent damage if you attempt to power the device back on or leave it on.