Melt the butter on low heat in a large skillet. Add the onions and salt. Sweat the onions, stirring, until they begin to caramelize. Turn up the heat to medium-low. Once a brown glaze has formed on the bottom of the skillet, pour approximately 2-3 tablespoons of water into the pan to deglaze and use a spatula to scrape up the brown bits and stir them into the onions. Repeat this glazing and deglazing process until the onions have been thoroughly caramelized and taste both sweet and bitter, approximately 25-35 minutes.
Add the port wine and balsamic vinegar and cook for another 10 minutes, stirring periodically, until all of the liquid has reduced and is coating the onions. Taste and add a bit more salt if desired.
If using the pizza dough: divide it into 8 even portions. On a lightly floured surface, roll out the dough into a thin long oval. Heat a skillet on medium and and a small amount of olive oil to coat the pan. Gently stretch the dough out further and place it on the skillet. Cook for several minutes on each side until slightly golden and cooked through. Poke any air pockets that may develop with a knife so they deflate.
Heat up the grill to the highest setting and allow it to get hot for several minutes Place the flatbreads or naan on the grill and allow them to char for about 30 seconds. Remove from the grill and turn the heat down to medium.
Spread approximately 1/4 cup of port onion jam onto the charred side of each piece of bread, leaving some space around the ends. Top with pieces of burrata.
Carefully place the flatbreads back on the grill and close the lid. Cook for 7 minutes, or until the cheese is melted through. Remove from the heat.
Layer the sliced green apple on top of the flatbreads. Sprinkle with thyme and serve.