Similar to calling super in a method, but dynamically bound.
Caveat: Do not ever do getSuper(this, methodName)?.methodName
as that may return this[methodName] if it was defined in a superclass.
Instead use getSuperMember(this, methodName), which ensures the parent method is returned.
Parameters
obj: any
An object, class or instance.
testFn: any
If defined, the function will return the superclass that passes a given test.
Returns any
The relevant superclass or prototype or null if none exists.
Similar to calling
superin a method, but dynamically bound. Caveat: Do not ever dogetSuper(this, methodName)?.methodNameas that may returnthis[methodName]if it was defined in a superclass. Instead usegetSuperMember(this, methodName), which ensures the parent method is returned.