Update jspp.js
This commit is contained in:
parent
f7f25a2c3a
commit
a05cbc84ef
1 changed files with 4 additions and 3 deletions
7
jspp.js
7
jspp.js
|
@ -348,6 +348,7 @@ class JSPlusPlus {
|
||||||
|
|
||||||
}
|
}
|
||||||
static HTMLFrontend = class {
|
static HTMLFrontend = class {
|
||||||
|
const htmlFront = new JSPlusPlus.HTMLFrontend
|
||||||
// Get element by ID
|
// Get element by ID
|
||||||
getElementById(elementID) {
|
getElementById(elementID) {
|
||||||
return document.getElementById(elementID)
|
return document.getElementById(elementID)
|
||||||
|
@ -450,11 +451,11 @@ class JSPlusPlus {
|
||||||
}
|
}
|
||||||
|
|
||||||
createDiv(elementID) {
|
createDiv(elementID) {
|
||||||
createElement("div", elementID);
|
htmlFront.createElement("div", elementID);
|
||||||
}
|
}
|
||||||
|
|
||||||
createParagraph(elementID, text) {
|
createParagraph(elementID, text) {
|
||||||
let elem = createElement("p", elementID);
|
let elem = htmlFront.createElement("p", elementID);
|
||||||
elem.innerText = `${text}`
|
elem.innerText = `${text}`
|
||||||
return elem
|
return elem
|
||||||
}
|
}
|
||||||
|
@ -539,7 +540,7 @@ class JSPlusPlus {
|
||||||
}
|
}
|
||||||
|
|
||||||
createImage(elementID, src) {
|
createImage(elementID, src) {
|
||||||
return createElement("img", elementID, { src: src });
|
return htmlFront.createElement("img", elementID, { src: src });
|
||||||
}
|
}
|
||||||
|
|
||||||
// Get URL parameters
|
// Get URL parameters
|
||||||
|
|
Loading…
Reference in a new issue