1.0.2 • Published 1 year ago
dom_gen_cosbert v1.0.2
Dom Generation Function
v1.0.2
Contains a function that handles making new DOM elements. Accepts up to 3 arguments.
Your first argument requires a valid HTML element. This argument generates your element.
Example: domEleGen.makeELe("div");
The second argument requires a string value. This argument sets the text content of the element.
Example: domEleGen.makeEle("div", "myString");
The third argument accepts either an Array of 2 strings or a nested Array with 2 strings in each array. This argument sets the attributes for your element.
Example One: domEleGen.makeEle("div", "myString", "class", "myClass"); Example Two: domEleGen.makeEle("img", "", ["class", "myClass", "src", "https://google.com"]);