Decide what flan/tart dish you want to use and roll out your pastry accordingly, cover the dish and work into the corners cut off the excess and blind bake for about 12-15 minutes - just until the pastry is no longer raw.
In the meantime flash fry the liver after you've cut the liver into small pieces (I also like to soak the liver in some milk before and then drain and sift in some flour seasoned with some fresh black pepper and salt) - the liver should be just lightly seared.
Once the liver has been seared set aside and cover - by the way I like to use half butter and half olive oil but the oil is whatever you prefer to use.
Toss the onion in a bowl with a little oil and salt and pepper to break up the onion and coat it - this makes the onion frying process quicker.
Fry the onion until just brown - not burnt - then set aside on some kitchen paper.
In a bowl whisk the eggs and add the milk enough to make a quiche/custard mixture season with salt and pepper.
Pastry should be done - take it out of the oven and turn the oven up to 375°.
Some like to let the pastry cool but I find it makes little difference.
Add the liver to evenly distribute around the flan.
Do the same with the onion.
Add the egg and milk mixture but don't overfill.
Bake in the oven for 25 - 35 minutes depending on your oven - the mixture should not move when you jiggle the flan.
When done - take out and either serve straight away or cool and serve cold - I enjoy both.
If you need to serve it with a sauce or something I think a Cumberland sauce would work well.