Unfortunately, if you just try to look in the Chrome console on this example, it will not be easy for you to see, you just get the function body:
> document.body.onclick
function () {
i += 1;
}
And looking only at document.body, you get a DOM tree inspector, not a Javascript object.
Do this:
a = { f: document.body.onclick }
, , f, <function scope>, , , t24 > .
( ..), , . Chrome, addEventListener, , getEventListeners ().