In the Google Merchant Center structured data documentation, it says that you should add structured data to the HTML source and that it "can't be generated after a page has been loaded using ...
Google updates guidance on Product markup, advising ecommerce sites to prioritize HTML implementation and use JavaScript cautiously. Google recommends including Product markup in initial HTML for best ...