Telerik-Verified-Plugins / WKWebView

DEPRECATED - this plugin served a purpose in the past, but there are better implementation now
832 stars 149 forks source link

window.onerror only provides "script error" due to file being loaded by file:// #270

Open JeremyColton opened 7 years ago

JeremyColton commented 7 years ago

Running WKWebView 1.0.1, Cordova ios 4.0.1, my window.onerror handler provides the following:

window.onerror = function(message, url, lineno, colno, error) { //message = "script error" //url = "" //lineno = 0 //colno = 0 //error = null );

Is there a flag/setting that will stop the Mobile Safari browser from hiding this critical info?

UniqueSilence commented 7 years ago

NO MainViewController. How can i do?

imGiantChan commented 5 years ago

I am confused about this issue as same as @JeremyColton , I am trying to log the javascript error message both in my Android & iOS hybridApp using window.onerror(), it works well in Android platform, but obviously failed in iOS, got the same "script error" without any other message. and I can not find any solution to this issue. Should I change my file loading from "file://" to "http://localhost"? Because it seems that using "http" to loading local file works fine.