If the following code works (which certainly does)
$( 'html, body' ).animate(
$( window ).animate(
$( window ).scroll( myScrollFunctionHandler );
$( 'html, body' ).scroll( myScrollFunctionHandler );
window does not have a scrollTop property, which is why your first example doesn't work.
As to your second example,
$(window).scroll is the event handler installer for window.onscroll. There is no "body onscroll" event, so obviously an event handler installed on the body (or html) element won't be invoked, as events do not bubble down the DOM, but only up.