Home >Web Front-end >JS Tutorial >Inject HTML snippet from file
A question on stackoverflow:
Include another HTML file in a HTML file
I was playing around and came up with a clean way to do it with:
1) Reading a content of the file with fetch()
2) Rendering a DOM Node from string
3) Replacing