iphone で一番下にスクロールしたことを検知する方法

iphone の mobile safari で一番下にスクロールしたことを検知する方法はないかと、いろいろと調べていたのですが、なかなか見つかりません。
以下のようにすることで、一番下にスクロールがきたときに処理を実施できますが、、、、
他にもっと良い方法がないのか奮闘中。


1 window.onscroll = function(){
2 var bottom_location = window.pageYOffset + window.innerHeight;
3 var bottom_max = document.documentElement.scrollHeight;
4 if( bottom_location == bottom_max ){
5 alert('hogehoge');
6 }
7 }