js/template.js

10 lines
244 B
JavaScript
Raw Normal View History

2021-02-17 10:02:58 +00:00
export const template = (strings, ...args) => {
let buf = []
for (i=0;i<strings.length;i++) {
buf.push(strings[i], args[i])
}
let template = document.createElement("template")
template.innerHTML = buf.join("")
2021-02-22 19:24:17 +00:00
return template.content
}