mirror of
https://github.com/electron/electron.git
synced 2026-04-10 03:01:51 -04:00
Only set size and load URL on first attach
This commit is contained in:
@@ -78,7 +78,15 @@ const createGuest = function (embedder, params) {
|
||||
guest.on('did-attach', function () {
|
||||
params = this.attachParams
|
||||
delete this.attachParams
|
||||
|
||||
const previouslyAttached = this.viewInstanceId != null
|
||||
this.viewInstanceId = params.instanceId
|
||||
|
||||
// Only load URL and set size on first attach
|
||||
if (previouslyAttached) {
|
||||
return
|
||||
}
|
||||
|
||||
this.setSize({
|
||||
normal: {
|
||||
width: params.elementWidth,
|
||||
|
||||
Reference in New Issue
Block a user