Forum Discussion

SZimmie's avatar
SZimmie
Copper Contributor
Apr 01, 2021

Edge for iOS window.onerror throws null Errors

Has anyone else had issues with Edge for iOS throwing null errors with window.onerror = globalErrorHandler?

 

I'm using Edge iOS version 46.2.5, whenever the onerror is assigned it immediately throws nulls errors.  It works flawlessly in Chrome and Safari iOS, but not Edge.  Edge for Mac OS and Edge for Windows also work fine.  It just seems to be the iOS version.

 

There is a strange caveat, the window.onerror assignment works if the page is loaded in an IFrame.  It's only when the page is loaded directly as the top window it throws null errors.

  • gerlge's avatar
    gerlge
    Copper Contributor
    ok I solved by using window.addEventListener("error",myFunc);
  • gerlge's avatar
    gerlge
    Copper Contributor

    SZimmie 

    same issue here with IOS 14.6 and Edge, but also with Chrome in iframe only

Resources