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 recommends including Product markup in initial HTML for best results. JavaScript-generated markup can lead to less frequent and reliable crawls. E-commerce sites using JavaScript for product ...