Expand error message

This commit is contained in:
Kevin Sawicki 2016-02-09 13:51:35 -08:00
parent 674af4211c
commit bad4816976
2 changed files with 2 additions and 2 deletions

View file

@ -409,7 +409,7 @@ var registerWebViewElement = function() {
if (internal.webContents) { if (internal.webContents) {
return internal.webContents[m].apply(internal.webContents, args); return internal.webContents[m].apply(internal.webContents, args);
} else { } 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.`);
} }
}; };
}; };

View file

@ -570,7 +570,7 @@ describe('<webview> tag', function() {
readyError = error; 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.');
}); });
}); });