]> khamidou — GitHub mirrors - electron.git/commitdiff
Expand error message
authorKevin Sawicki <kevinsawicki@gmail.com>
Tue, 9 Feb 2016 21:51:35 +0000 (13:51 -0800)
committerKevin Sawicki <kevinsawicki@gmail.com>
Tue, 9 Feb 2016 21:51:35 +0000 (13:51 -0800)
atom/renderer/lib/web-view/web-view.js
spec/webview-spec.js

index 49440527c4068fb34efaf8ba8aa25748d21a6841..9cc6ac4e880405eb53ba5c8e7ff8432bedd8fd1e 100644 (file)
@@ -409,7 +409,7 @@ var registerWebViewElement = function() {
       if (internal.webContents) {
         return internal.webContents[m].apply(internal.webContents, args);
       } else {
-        throw new Error(`Cannot call ${m} before the dom-ready event is emitted`);
+        throw new Error(`Cannot call ${m} because the webContents is unavailable. The WebView must be attached to the DOM and the dom-ready event emmitted before this method can be called.`);
       }
     };
   };
index 072a51f36a5abaa2bb00654f4ca4b1c6e0cdab94..0b6572a5084be0c69654bf222b0ff7da387f44a7 100644 (file)
@@ -570,7 +570,7 @@ describe('<webview> tag', function() {
         readyError = error;
       }
 
-      assert.equal(readyError.message, 'Cannot call stop before the dom-ready event is emitted');
+      assert.equal(readyError.message, 'Cannot call stop because the webContents is unavailable. The WebView must be attached to the DOM and the dom-ready event emmitted before this method can be called.');
     });
   });