1
0
mirror of https://github.com/chinchang/web-maker.git synced 2025-07-14 02:26:20 +02:00

code cleaning

This commit is contained in:
Kushagra Gour
2017-06-26 16:23:20 +05:30
parent 569626223e
commit dbf2d33b4c
2 changed files with 2 additions and 5 deletions

View File

@ -13,7 +13,7 @@ window.jsLibs = [
{ url: 'https://cdnjs.cloudflare.com/ajax/libs/gsap/1.19.1/TweenMax.min.js', label: 'Greensock TweenMax', type: 'js' },
{ url: 'https://cdnjs.cloudflare.com/ajax/libs/uikit/2.27.4/js/uikit.min.js', label: 'UIkit 2', type: 'js' },
{ url: 'https://cdnjs.cloudflare.com/ajax/libs/uikit/3.0.0-beta.25/js/uikit.min.js', label: 'UIkit 3', type: 'js' },
]
];
window.cssLibs = [
{ url: 'https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css', label: 'Bootstrap 3', type: 'css' },
{ url: 'https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-alpha.6/css/bootstrap.min.css', label: 'Bootstrap 4α', type: 'css' },
@ -24,4 +24,4 @@ window.cssLibs = [
{ url: 'https://cdnjs.cloudflare.com/ajax/libs/uikit/3.0.0-beta.25/css/uikit.min.css', label: 'UIkit 3', type: 'css' },
{ url: 'https://cdnjs.cloudflare.com/ajax/libs/animate.css/3.5.2/animate.min.css', label: 'Animate.css', type: 'css' },
{ url: 'https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css', label: 'FontAwesome', type: 'css' },
]
];

View File

@ -1411,14 +1411,11 @@ runBtn, searchInput, consoleEl, consoleLogEl, logCountEl, fontStyleTag, fontStyl
// 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;
})
})