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.`);
}
};
};
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.');
});
});