Cut your onions in half, peel them then finely dice. Add the butter to a medium fry pan over medium low heat.
When melted add the onions, thyme and 3/4 tsp salt. Cook over medium heat, stirring occasionally, about 25 minutes in all. At first the onions will be very moist, but after 10 minutes their water will have cooked off and they'll begin to colour. They needn't be caramelized, but just take on a faint golden hue. When done, let them cool slightly.
Taste for salt - they will be very sweet so you might want to add more - and season well with pepper.
While the onions are cooking, whisk the eggs with the cream and milk. Stir in the cooked onions and the cheese,
Put the flour and salt in the bowl of a stand mixer fitted with a paddle attachment. Add the butter and turn mixer to low speed until the butter has broken into small, pebble sized pieces.
Drizzle in the ice water until the dough looks clumpy and damp. You'll use about 3 tablespoons or less if the butter was soft. Form the dough into a disk or rectangle to correspond to the shape pan you're using, wrap in plastic bag and refrigerate.
Heat the oven to 400 degrees F.
Roll the dough to fit your chosen tart pan, then drape it in the pan. Neatly press the dough up the sides of the pan and shape it. Set it on a sheet pan.
When the oven is ready, pour in the onion mixture, even it out, then bake until the surface is golden and browned in places, 45 to 50 minutes.
Let cool to warm before cutting into slices and serving