rm hmtl.js
This commit is contained in:
parent
8d8d292ac2
commit
9c8be1a264
1 changed files with 0 additions and 24 deletions
24
src/html.js
24
src/html.js
|
@ -1,24 +0,0 @@
|
|||
class html {
|
||||
constructor() {
|
||||
this.html = '';
|
||||
}
|
||||
|
||||
|
||||
async loadingStart(element) {}
|
||||
|
||||
async loadingEnd(element) {}
|
||||
|
||||
async render(element, content) {
|
||||
var template = '%s';
|
||||
if (element.hasAttribute('html-template'))
|
||||
template = element.getAttribute('html-template');
|
||||
else if (element.hasAttribute("template")) {
|
||||
template = element.innerHTML;
|
||||
element.setAttribute('html-template', template);
|
||||
}
|
||||
|
||||
element.innerHTML = template.replace('%s', content);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in a new issue