NEW 144912
WKWebView should expose _loadAlternateHTMLString:baseURL:forUnreachableURL:
https://bugs.webkit.org/show_bug.cgi?id=144912
Summary WKWebView should expose _loadAlternateHTMLString:baseURL:forUnreachableURL:
Stefan Arentz
Reported 2015-05-12 07:30:45 PDT
Exposing WKWebView#_loadAlternateHTMLString:baseURL:forUnreachableURL: would allow people to us show error messages in-content while maintaining a sane BackForwardList. The problem with the alternatives, loadHTML or loadRequest from an embedded HTTP Server, do not play well with the (read-only) BackForwardList. When presenting an error with loadHTML, it will *replace* the current page you are on. When presenting an error with loadRequest, either from embedded server or file: URL, it will generate a new entry in the BackForwardList that you cannot get rid of. The _loadAlternateHTMLString:baseURL:forUnreachableURL API seems to add the failing page to the BackForwardList while presenting alternative content, like an error message. This means a call to reloadFromOrigin will simply retry the page and leave the BackForwardList in a good state that makes sense.
Attachments
Stefan Arentz
Comment 1 2015-05-12 17:00:33 PDT
Would you accept a patch for exposing this functionality? I'm happy work with the WebKit team to produce something.
Radar WebKit Bug Importer
Comment 2 2015-06-11 16:55:50 PDT
Note You need to log in before you can comment on or make changes to this bug.