One layout w/ Webviewer displaying table diffferent css

I’m curious — let’s say you’ve built an HTML/JS/CSS table that displays records inside FileMaker using the JSinFM integration. Now, imagine you want this setup to be flexible so it can show records from different sources (for example, the Products table in one case or the Services table in another). On top of that, you’d like to be able to adjust the CSS so that each type of table can have its own look and feel. But keepiong it so when you modify the JS for whatever reason its uploaded to the one record in the html table you pull it from.

How could you design or structure this system so that the table rendering is universal, but still allows for CSS customization depending on the data source?