I want to monkeypatch event listener registrations.
I found this answer showing how to do it for addEventListener:
addEventListener
const native
You can get the original setter function with:
const originalSetter = Object.getOwnPropertyDescriptor(HTMLElement.prototype, 'onchange').set;
If you want to redefine a property, you should look at using Object.defineProperty().