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:
@ -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 () {
|
||||
|
Reference in New Issue
Block a user