]> khamidou — GitHub mirrors - electron.git/commitdiff
add ValidatedUrl to did-fail-load event
authorGohy Leandre <leandre.gohy@hexeo.be>
Mon, 31 Aug 2015 09:18:10 +0000 (11:18 +0200)
committerGohy Leandre <leandre.gohy@hexeo.be>
Wed, 9 Sep 2015 13:56:16 +0000 (15:56 +0200)
atom/browser/api/atom_api_web_contents.cc
atom/renderer/lib/web-view/guest-view-internal.coffee
docs/api/web-contents.md
docs/api/web-view-tag.md

index 9cb52a1ec74d2d6a2c9780729a43c25354d5d02c..7c37f17e10d9592237c9048798f0d28e76d8bf04 100644 (file)
@@ -388,7 +388,7 @@ void WebContents::DidFailProvisionalLoad(
     int error_code,
     const base::string16& error_description,
     bool was_ignored_by_handler) {
-  Emit("did-fail-load", error_code, error_description);
+  Emit("did-fail-load", error_code, error_description, validated_url);
 }
 
 void WebContents::DidFailLoad(content::RenderFrameHost* render_frame_host,
@@ -396,7 +396,7 @@ void WebContents::DidFailLoad(content::RenderFrameHost* render_frame_host,
                               int error_code,
                               const base::string16& error_description,
                               bool was_ignored_by_handler) {
-  Emit("did-fail-load", error_code, error_description);
+  Emit("did-fail-load", error_code, error_description, validated_url);
 }
 
 void WebContents::DidStartLoading() {
index 44db5e304db403296ecc39905a5cc13bff428c2b..b491184fb8d7801ac2fa4c5c6d9b1a269169a225 100644 (file)
@@ -6,7 +6,7 @@ requestId = 0
 WEB_VIEW_EVENTS =
   'load-commit': ['url', 'isMainFrame']
   'did-finish-load': []
-  'did-fail-load': ['errorCode', 'errorDescription']
+  'did-fail-load': ['errorCode', 'errorDescription', 'validatedUrl']
   'did-frame-finish-load': ['isMainFrame']
   'did-start-loading': []
   'did-stop-loading': []
index 89afae43d1c066e0239b6ff2e10685d4cd1f8ab4..a3d3c360fff6d8932e7c532925077fedbb50c6bd 100644 (file)
@@ -32,6 +32,7 @@ Returns:
 * `event` Event
 * `errorCode` Integer
 * `errorDescription` String
+* `validatedUrl` String
 
 This event is like `did-finish-load` but emitted when the load failed or was
 cancelled, e.g. `window.stop()` is invoked.
index 850390702168af86a7492b286a8241c4de900486..ff12110fac842b7dca24d9d7f35f22118cb2d139 100644 (file)
@@ -384,6 +384,7 @@ Returns:
 
 * `errorCode` Integer
 * `errorDescription` String
+* `validatedUrl` String
 
 This event is like `did-finish-load`, but fired when the load failed or was
 cancelled, e.g. `window.stop()` is invoked.