formatting
This commit is contained in:
parent
cb459bc877
commit
72eb24b0fa
|
@ -122,10 +122,10 @@
|
||||||
window.addEventListener("message", receiveMessage)
|
window.addEventListener("message", receiveMessage)
|
||||||
} else {
|
} else {
|
||||||
// Legacy - remove in later versions of BB
|
// Legacy - remove in later versions of BB
|
||||||
iframe.contentWindow.addEventListener("ready", () => {
|
iframe.contentWindow.addEventListener("ready", () => {
|
||||||
receiveMessage({ data: { type: MessageTypes.READY }})
|
receiveMessage({ data: { type: MessageTypes.READY }})
|
||||||
}, { once: true })
|
}, { once: true })
|
||||||
iframe.contentWindow.addEventListener("error", event => {
|
iframe.contentWindow.addEventListener("error", event => {
|
||||||
receiveMessage({ data: { type: MessageTypes.ERROR, error: event.detail }})
|
receiveMessage({ data: { type: MessageTypes.ERROR, error: event.detail }})
|
||||||
}, { once: true })
|
}, { once: true })
|
||||||
// Add listener for events sent by client library in preview
|
// Add listener for events sent by client library in preview
|
||||||
|
@ -138,7 +138,7 @@
|
||||||
onDestroy(() => {
|
onDestroy(() => {
|
||||||
if (iframe.contentWindow) {
|
if (iframe.contentWindow) {
|
||||||
if ($store.clientFeatures.messagePassing) {
|
if ($store.clientFeatures.messagePassing) {
|
||||||
window.removeEventListener("message", receiveMessage) //
|
window.removeEventListener("message", receiveMessage) //
|
||||||
} else {
|
} else {
|
||||||
// Legacy - remove in later versions of BB
|
// Legacy - remove in later versions of BB
|
||||||
iframe.contentWindow.removeEventListener("bb-event", handleBudibaseEvent)
|
iframe.contentWindow.removeEventListener("bb-event", handleBudibaseEvent)
|
||||||
|
|
Loading…
Reference in New Issue