What would be the best way of loading a html snippet from an external html file inside of a layer? Something like:
myTable = new Layer
myTable.snippet = "snippets/table.html"
The snippet would have all the html and css needed to structure and style the table (layer.snippet obviously doesn't exist).
Another solution would be to turn the html snippets into images with something like http://html2canvas.hertzen.com/ and then simply use layer.image to load the generated image inside the layer.
I'm probably over thinking things but the main idea is to quickly structure and style elements using html and css (using bootstrap, polymer, etc.) instead of having to create them on Photoshop or Sketch first.
It'd also keep the .js file clean by avoiding the inline html that might get quite complex for anything more than a simple div.