Melt the onions in a skillet and brown the onions in it. Grease the casserole dish, and preheat the oven to 350 °F.
Layer the casserole dish with thinly sliced potatoes, the flaked salmon and the onions, divided equally. Begin and end the layering with potatoes. Each time you put in a layer of potatoes, sprinkle some salt and pepper, reserving 1/2 tsp of the salt for later. (That is, divide 1.5 tsp of salt between the layers.)
After all the layers are in the casserole, whisk the eggs and remaining salt until frothy, and then whisk in the cream. Pour this mix over the casserole
Bake at 350 °F covered for 30 minutes. Remove cover, and bake for an additional 20 - 30 minutes at the same temperature until the potatoes are thoroughly cooked and are lightly browned on top.