docs: public static <T> void wrapMethod(T object, String methodName,
        AfterMethodCall<T> afterMethodCall) {
      Function method = (Function) ((JsPropertyMap) object).get(methodName);
  
      WrappingFunction wrappingFunction = args -> {
        Object result = method.apply(object, args);
        afterMethodCall.execute(object, methodName, result, args);
        return result;
      };
  
      ((JsPropertyMap) object).set(methodName, wrappingFunction);
    }