catch any errors that occur when trying to open a new window
Merge pull request #895 from jay-hodgson/release-36

catch any errors that occur when trying to open a new window from javascript