mirror of
https://github.com/electron/electron.git
synced 2026-04-10 03:01:51 -04:00
fixup tests
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
# CancellableNavigationEvent Object extends `Event`
|
||||
|
||||
* `returnValue` Object | null - Set this to cancel the navigation event and optionally return a custom error code or error page
|
||||
* `returnValue` Object - Set this to cancel the navigation event and optionally return a custom error code or error page
|
||||
* `errorCode` Number - Can be any error code from the [Net Error List](https://source.chromium.org/chromium/chromium/src/+/master:net/base/net_error_list.h). If you provide `errorPage` then this code can not be `-3`. We recommend using `-2` which is `net::Aborted`.
|
||||
* `errorPage` String (optional) - Custom HTML error page to display when the navigation is cancelled.
|
||||
|
||||
|
||||
@@ -86,7 +86,7 @@ content::NavigationThrottle::ThrottleCheckResult
|
||||
ElectronNavigationThrottle::WillStartRequest() {
|
||||
auto* handle = navigation_handle();
|
||||
if (handle->IsRendererInitiated() && handle->IsInMainFrame())
|
||||
return DelegateEventToWebContents("-will-navigate", net::ERR_FAILED);
|
||||
return DelegateEventToWebContents("-will-navigate", net::ERR_ABORTED);
|
||||
return PROCEED;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user