Edge for iOS window.onerror throws null Errors

%3CLINGO-SUB%20id%3D%22lingo-sub-2248919%22%20slang%3D%22en-US%22%3EEdge%20for%20iOS%20window.onerror%20throws%20null%20Errors%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2248919%22%20slang%3D%22en-US%22%3E%3CP%3EHas%20anyone%20else%20had%20issues%20with%20Edge%20for%20iOS%20throwing%20null%20errors%20with%20window.onerror%20%3D%20globalErrorHandler%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI'm%20using%20Edge%20iOS%20version%2046.2.5%2C%20whenever%20the%20onerror%20is%20assigned%20it%20immediately%20throws%20nulls%20errors.%26nbsp%3B%20It%20works%20flawlessly%20in%20Chrome%20and%20Safari%20iOS%2C%20but%20not%20Edge.%26nbsp%3B%20Edge%20for%20Mac%20OS%20and%20Edge%20for%20Windows%20also%20work%20fine.%26nbsp%3B%20It%20just%20seems%20to%20be%20the%20iOS%20version.%3C%2FP%3E%3C%2FLINGO-BODY%3E
New Contributor

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.

2 Replies

@SZimmie 

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

ok I solved by using window.addEventListener("error",myFunc);