Browse Source

IMPRO,DEV: DEV intervall control as well as log

master
chris 6 months ago
parent
commit
5bf4f2e856
  1. 8
      src/context.js

8
src/context.js

@ -50,18 +50,20 @@ class PageBuilder {
let head = document.querySelector("head");
head.appendChild(this.#functions)
head.appendChild(this.#cssClasses)
console.log(this.#functionNames)
}
inDev() {
inDev(relaunchSeconds = 20) {
let head = document.querySelector("head");
let meta = document.createElement("meta");
meta.setAttribute("http-equiv", "refresh");
meta.setAttribute("content", "20");
meta.setAttribute("content", `${relaunchSeconds}`);
head.insertAdjacentElement("beforeend", meta);
this.#functions.innerText = `
let ts = new Date();
console.log("Refreshed at: ", ts.getHours()+':'+ts.getMinutes()+':'+ts.getSeconds());
console.log("Refreshed at: ", ts.getHours()+':'+ts.getMinutes()+':'+ts.getSeconds(), "Intervall ${relaunchSeconds}s");
`;
}
}

Loading…
Cancel
Save