Is it possible to trap extends
? Or to trap definitions inside a class? Eg:
class B extends A {
method1( ) { }
static method2( ) { }
}
Is there any way to trap the events that:
B
extendedA
.method1( )
was defined onB.prototype
method2( )
was defined onB
.
None of the existing mechanisms seem to work. Tried setPrototypeOf
and defineProperty
traps.