If i have the following approach:
element.addEventListener(\'click\', foo) const fooList = { 1: new barClass().function1, 2: new barClass().function2, 3: