As you peel potatoes immediately immerse in very cold water. Grate the onions and potatoes together and immediately put into a very fine mesh strainer (or clean tea towel) and squeeze out the water into a bowl.
Pour out as much water as possible then return the starch back into the potato mixture along with the onions, egg, flour, salt (and pepper if desired).
Meanwhile be heating a well-seasoned griddle or large pan with a thin layer of the oil. I love my old fashioned cast iron. Using a large spoon, scoop some of the mixture into the hot pan and flatten out as evenly as possible without breaking the pancake apart. Fry until golden brown, then gently flip and fry the other side. Use moderate high heat - hot enough to sizzle but not too hot as to burn before the centers are cooked. Again, practice will determine the speed of cooking. Thin pancakes yield crispy ones - that's the way we like them.
Drain on paper towels and serve immediately. If you have to wait to serve, just heat them in a 350° oven to crisp and heat up right on fresh paper towels - that way the heat will allow even more oil to drain off onto the absorbent paper towels.
Yes, they can be frozen but generally I'm not a fan. I like them freshly made if at all possible.