bug 922006 - [Dialer] Refactor onload event listener to make dialer.js testable