What’s the difference between this (seemingly) excessive class method autobind function and my dumbed down autobind function
function BindClassMethods(Class) {
const Prototype = Object.getPrototypeOf(Class);
const Methods = Object.getOwnPropertyNames(Prototype)
Methods.forEach((Method) => {
Class[Method] = Class[Method].bind(Class)
})
}
(I don’t like this hacky solution but is it still valid?)