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 () {
|
guest.on('did-attach', function () {
|
||||||
params = this.attachParams
|
params = this.attachParams
|
||||||
delete this.attachParams
|
delete this.attachParams
|
||||||
|
|
||||||
|
const previouslyAttached = this.viewInstanceId != null
|
||||||
this.viewInstanceId = params.instanceId
|
this.viewInstanceId = params.instanceId
|
||||||
|
|
||||||
|
// Only load URL and set size on first attach
|
||||||
|
if (previouslyAttached) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
this.setSize({
|
this.setSize({
|
||||||
normal: {
|
normal: {
|
||||||
width: params.elementWidth,
|
width: params.elementWidth,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue