The Web Inspector's timeline view should show when JavaScript was executing while the page loaded. I don't think it's necessary to show JavaScript execution after the last resource finishes loading. We could perhaps show this by shading the background of the timeline view a different color when JavaScript was executing.
<rdar://problem/5712810>
The Timeline panel does this.