From a05cbc84ef28e3be1daf7bf8b04f92ec88681721 Mon Sep 17 00:00:00 2001 From: Sam Sneed <163201376+sam-sneed@users.noreply.github.com> Date: Fri, 31 May 2024 21:14:13 +0000 Subject: [PATCH] Update jspp.js --- jspp.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/jspp.js b/jspp.js index 7e9902d..e9d30be 100644 --- a/jspp.js +++ b/jspp.js @@ -348,6 +348,7 @@ class JSPlusPlus { } static HTMLFrontend = class { + const htmlFront = new JSPlusPlus.HTMLFrontend // Get element by ID getElementById(elementID) { return document.getElementById(elementID) @@ -450,11 +451,11 @@ class JSPlusPlus { } createDiv(elementID) { - createElement("div", elementID); + htmlFront.createElement("div", elementID); } createParagraph(elementID, text) { - let elem = createElement("p", elementID); + let elem = htmlFront.createElement("p", elementID); elem.innerText = `${text}` return elem } @@ -539,7 +540,7 @@ class JSPlusPlus { } createImage(elementID, src) { - return createElement("img", elementID, { src: src }); + return htmlFront.createElement("img", elementID, { src: src }); } // Get URL parameters