code review: add listner once
This commit is contained in:
parent
7541ce91dd
commit
5799fbf23f
|
@ -110,11 +110,8 @@
|
||||||
frontendDefinition,
|
frontendDefinition,
|
||||||
}))
|
}))
|
||||||
}
|
}
|
||||||
let iframeLoaded = false
|
|
||||||
$: if(iframe && !iframeLoaded) {
|
$: if(iframe) iframe.contentWindow.addEventListener("bb-ready", refreshContent, { once: true })
|
||||||
iframe.contentWindow.addEventListener("bb-ready", refreshContent)
|
|
||||||
iframeLoaded = true
|
|
||||||
}
|
|
||||||
|
|
||||||
$: if(iframe && frontendDefinition) {
|
$: if(iframe && frontendDefinition) {
|
||||||
refreshContent()
|
refreshContent()
|
||||||
|
|
Loading…
Reference in New Issue