Create webContents for webview even when src is not set

This commit is contained in:
Cheng Zhao 2017-11-30 20:08:56 +09:00
parent 5e4914700e
commit 59476f0b30

View file

@ -230,7 +230,7 @@ class SrcAttribute extends WebViewAttribute {
}
parse () {
if (!this.webViewImpl.elementAttached || !this.webViewImpl.attributes[webViewConstants.ATTRIBUTE_PARTITION].validPartitionId || !this.getValue()) {
if (!this.webViewImpl.elementAttached || !this.webViewImpl.attributes[webViewConstants.ATTRIBUTE_PARTITION].validPartitionId) {
return
}
if (this.webViewImpl.guestInstanceId == null) {
@ -240,6 +240,9 @@ class SrcAttribute extends WebViewAttribute {
}
return
}
if (!this.getValue()) {
return
}
// Navigate to |this.src|.
const opts = {}