Bug 144912
| Summary: | WKWebView should expose _loadAlternateHTMLString:baseURL:forUnreachableURL: | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Stefan Arentz <stefan> |
| Component: | WebKit2 | Assignee: | Nobody <webkit-unassigned> |
| Status: | NEW | ||
| Severity: | Normal | CC: | andersca, ap, benjamin, sam, webkit-bug-importer |
| Priority: | P2 | Keywords: | InRadar |
| Version: | 528+ (Nightly build) | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
Stefan Arentz
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 | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Stefan Arentz
Would you accept a patch for exposing this functionality? I'm happy work with the WebKit team to produce something.
Radar WebKit Bug Importer
<rdar://problem/21350071>