Source: pages/functionsInterface.js

/**
 * Base class for all Pages and Content. Each element of a page shall be derived by this base class
 * to assert this function set is always callable.
 * Shall be treated as an interface creating instances of this class makes no sense.
 * @abstract
 */
class FunctionsInterface {
    #throwError(){
        throw Error("implement in Child");
    }

    /**
     * create the element that is added to the dom, if nothing is added to the dom return a DocumentFragment
     * @returns {Element | DocumentFragment}
     */
    setup(){
        this.#throwError();
    }

    /**
     * updates language specific strings
     * @abstract
     */
    updateLang(){
        this.#throwError();
    }

    /**
     * updates elements that need special color and are not effected by the bootstrap mode change
     * @abstract
     */
    updateColor(){
        this.#throwError();
    }

    /**
     * adds the event listeners to the element that was set up with this.setup()
     * @abstract
     */
    addEventListeners(){
        this.#throwError();
    }

    /**
     * Executes code that depends on Pyodide fully loaded.
     * Is called after Pyodide is ready and makes changes to the element created with
     * this.setup() that can only be active or made after Pyodide is loaded. Is called by {@link PageManager} as soon as
     * Pyodide is ready.
     * @abstract
     */
    afterPyodideLoaded(){
        this.#throwError();
    }

    /**
     * Is called after the Page is usable by PageManager and is the set-up of funny functionality but not necessary
     * for function of page.
     * @abstract
     */
    setupEasterEggs(){
        this.#throwError();
    }
}