1
0
mirror of https://github.com/chinchang/web-maker.git synced 2025-07-13 18:16:19 +02:00

move changelog to separate html. fixes #152

This commit is contained in:
Kushagra Gour
2017-06-25 15:18:49 +05:30
parent e6b4cbabde
commit 569626223e
3 changed files with 191 additions and 157 deletions

View File

@ -1407,6 +1407,23 @@ runBtn, searchInput, consoleEl, consoleLogEl, logCountEl, fontStyleTag, fontStyl
attachListenerForEvent('change');
attachListenerForEvent('input');
attachListenerForEvent('keyup');
// Compile d-html directive
const dHtmlNodes = $all(`[d-html]`);
dHtmlNodes.forEach(function (el) {
console.log(Date.now())
fetch(el.getAttribute('d-html')).then((response) => {
// Stop further compilation because of future recursion by removing attribute.
el.removeAttribute('d-html');
response.text().then((html) => {
console.log(Date.now())
requestIdleCallback(() => {
console.log(Date.now())
el.innerHTML = html;
})
})
})
});
}
function init () {