When viewed in Edge iOS, this will always show an alert showing "Script error. - null". If I intentionally throw an error after adding the handler, then I first get an alert for it with the expected message, but then I also get the generic null error message too.
@jbarile I have come across the exact same issue with Edge for iOS version 46.2.5. When the global error handler is assigned, it throws null errors every time the app is touched. This only happens with Edge iOS. Chrome and Safari work as expected. This is, IMO, a huge BUG.
However, when loading a page in an IFrame, the window.onerror works fine. It's only in the main page, or top window that has this bug.