I am working on a small framework. I made it, so i can handle everything in it. I got one problem tho...
This function just wont work. I am not going to show the full code, I just want to know, if I made anything wrong within this function.
static createXel(element, attributes) {
var htmlelement;
if (element == "h1"
element == "h2"
element == "h3"
element == "h4"
element == "h5"
element == "h6") {
htmlelement = 'HTMLHeadingElement';
} else {
htmlelement = HTMLElementsArr[element];
}
I got it. I had to add "||" for it to work, so it looks like this.
static createXel(element, attributes) {
var htmlelement;
if (element == "h1" ||
element == "h2" ||
element == "h3" ||
element == "h4" ||
element == "h5" ||
element == "h6") {
htmlelement = 'HTMLHeadingElement';
} else {
htmlelement = HTMLElementsArr[element];
}