I'm on Windows and have always (lazily?) avoided the Javascript issue with
Win32::IE::Mechanize. I've also seen
Mozilla::Mechanize get mentions. I say lazy because these use the same interface as
WWW::Mechanize so it's straightforward to port code.
With these modules you just let the page render and take the html from there. It's ugly and slow but usually works.