(name, generator)
| 23 | } |
| 24 | |
| 25 | function defineCustomElement(name, generator) { |
| 26 | let htmlTemplatePath = name + '-template.html'; |
| 27 | fetch(htmlTemplatePath) |
| 28 | .then(stream => stream.text()) |
| 29 | .then(templateText => customElements.define(name, generator(templateText))); |
| 30 | } |
no test coverage detected