fix issue #2

add onBrowserError event
Merge pull request #3 from weiher/fix_issue2

fix issue #2