Qt Webkit: Javascript error causes page to not load
-
Using QWebView to display a credential page with username and password displays. Since this is a 2FA authentication, after providing username and password, the 2nd-factor webpage is not loaded. There is a blank screen present.
The issue seems to be caused by a Javascript error:
"TypeError: null is not an object (evaluating 'localStorage.length')"
I've know I can detect Javascript errors by overriding:
QWebPage::javaScriptConsoleMessage
However, all I want to do is ignore this Javascript error and continue to the destination page?
-
Since Qt Webkit was de-supported by Qt many years ago you may well not get an answer. If it supplies the JavaScript which is faulting can you alter that yourself?
-
The Javascript is from a webserver do not have control on our side
-
I understand. Like I said, the webkit browser is pretty old now. I don't know what you can/should do.
-
Let's say hypothetically, I was using the newer QWebEngine...what would you do in that case. I'm sure the basic fundamental JavaScript handling and functionality is the same for both.
-
As I understand it, you visit a particular web page and get a JS error in an old browser. These things happen. The error means
localStorage
is not defined. If you try visiting that page viaQWebEngine
do you get that error?
5/6