Only set size and load URL on first attach
This commit is contained in:
parent
b84fed5cb2
commit
133ad6e18b
1 changed files with 8 additions and 0 deletions
|
@ -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,
|
||||
|
|
Loading…
Add table
Reference in a new issue