Tue, Mar 19, 2024, 2:52 AM +00:00

This commit is contained in:
buzz-lightsnack-2007 2024-03-19 02:52:26 +00:00
parent c2ec20c931
commit 5a340347f9

View file

@ -3,8 +3,16 @@ Control the interface!
*/
export default class interface {
function define(element_type, element_content, element_id = ``, element_class = ``) {
/* Defines a new element. */
static define(element_type, element_content, element_id = ``, element_class = ``) {
/* Defines a new element.
Parameters:
element_type: the type of the element to be inserted
element_content: the HTML content of that element
element_id: the element ID
element_class: the class of the element to be inserted
Returns: the created element
*/
let element_new = document.createElement(element_type);
element_new.innerHTML = element_content;
@ -25,4 +33,19 @@ export default class interface {
return (element_new);
};
static add(element_parent, element_type, element_content, element_id = ``, element_class = ``) {
/* Adds or injects an element.
Parameters:
element_parent: The parent element
element_type: the element type
element_content: the content of the element
element_id: the element id
element_class: the element class name
Returns: the inserted element
*/
}
}