I've found it quite "disturbing" in 2026 there are APIs that wouldn't use Promise and accept a last argument as function to retrieve data, see: https://doc.qt.io/qt-6/qtwebchannel-javascript.html#interacting-with-qobjects
Here an easy way to workaround that, where equality of the method is preserved and things would look more modern or easier to reason about.
const { apply } = Reflect;
const { create } = Object;
const wm = new WeakMap;
