Heat oil in a large deep pan on medium-high heat. Add onions and cook for about 10 minutes or until softened and wilted.
Add the salt and brown sugar and cook uncovered for an additional 20 minutes until the onions are caramelized. Set aside and allow to cool while you prepare the tart. Make sure your onions are cooled enough before you put them on the cold tart.
Preheat the oven to 400° Fahrenheit.
Carefully unroll each pastry tart. Place them slightly overlapping on a baking sheet lined with parchment paper. Lightly press the two tarts creating one large rectangular-sized tart. Fold up the sides around the whole tart to create a pretty finished edge. Prick with a fork every inch or so to help prevent bubbling while baking.
Sprinkle the cheese evenly on the tart.
Evenly lay the onions on top of the pastry.
Using a pastry brush, brush the folded edges of the pastry with heavy cream to create that golden brown edge. Sprinkle on the thyme leaves.
Bake for 18-20 minutes or until cheese has melted and pastry is crisp. Cool for 5 minutes before cutting into squares or triangles. Garnish with additional thyme leaves if desired.